Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 244808
Collapse All | Expand All

(-)libpng-1.2.33rc01/example.c (-1 / +1 lines)
Lines 2-8 Link Here
2
#if 0 /* in case someone actually tries to compile this */
2
#if 0 /* in case someone actually tries to compile this */
3
3
4
/* example.c - an example of using libpng
4
/* example.c - an example of using libpng
5
 * Last changed in libpng 1.2.33 [October 15, 2008]
5
 * Last changed in libpng 1.2.33 [October 23, 2008]
6
 * This file has been placed in the public domain by the authors.
6
 * This file has been placed in the public domain by the authors.
7
 * Maintained 1998-2008 Glenn Randers-Pehrson
7
 * Maintained 1998-2008 Glenn Randers-Pehrson
8
 * Maintained 1996, 1997 Andreas Dilger)
8
 * Maintained 1996, 1997 Andreas Dilger)
(-)libpng-1.2.33rc01/png.h (+1 lines)
Lines 208-213 Link Here
208
 *    1.0.40                  10    10040  10.so.0.40[.0]
208
 *    1.0.40                  10    10040  10.so.0.40[.0]
209
 *    1.2.32                  13    10232  12.so.0.32[.0]
209
 *    1.2.32                  13    10232  12.so.0.32[.0]
210
 *    1.2.33beta01-02         13    10233  12.so.0.33[.0]
210
 *    1.2.33beta01-02         13    10233  12.so.0.33[.0]
211
 *    1.2.33rc01-02           13    10233  12.so.0.33[.0]
211
 *
212
 *
212
 *    Henceforth the source version will match the shared-library major
213
 *    Henceforth the source version will match the shared-library major
213
 *    and minor numbers; the shared-library major version number will be
214
 *    and minor numbers; the shared-library major version number will be
(-)libpng-1.2.32/pngrutil.c (-7 / +12 lines)
Lines 1-8 Link Here
1
1
2
/* pngrutil.c - utilities to read a PNG file
2
/* pngrutil.c - utilities to read a PNG file
3
 *
3
 *
4
 * Last changed in libpng 1.2.31 [August 19, 2008]
4
 * Last changed in libpng 1.2.33 [October 23, 2008]
5
 * For conditions of distribution and use, see copyright notice in png.h
5
 * For conditions of distribution and use, see copyright notice in png.h
6
 * Copyright (c) 1998-2008 Glenn Randers-Pehrson
6
 * Copyright (c) 1998-2008 Glenn Randers-Pehrson
7
 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
7
 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
8
 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
8
 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
Lines 1939-1961 Link Here
1939
      length = (png_uint_32)65535L;
1939
      length = (png_uint_32)65535L;
1940
   }
1940
   }
1941
#endif
1941
#endif
1942
1942
1943
   key = (png_charp)png_malloc_warn(png_ptr, length + 1);
1943
   png_free(png_ptr,png_ptr->chunkdata);
1944
   if (key == NULL)
1944
   png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);
1945
   if (png_ptr->chunkdata == NULL)
1945
   {
1946
   {
1946
     png_warning(png_ptr, "No memory to process text chunk.");
1947
     png_warning(png_ptr, "No memory to process text chunk.");
1947
     return;
1948
     return;
1948
   }
1949
   }
1949
   slength = (png_size_t)length;
1950
   slength = (png_size_t)length;
1950
   png_crc_read(png_ptr, (png_bytep)key, slength);
1951
   png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);
1951
1952
1952
   if (png_crc_finish(png_ptr, skip))
1953
   if (png_crc_finish(png_ptr, skip))
1953
   {
1954
   {
1954
      png_free(png_ptr, key);
1955
      png_free(png_ptr, png_ptr->chunkdata);
1956
      png_ptr->chunkdata = NULL;
1955
      return;
1957
      return;
1956
   }
1958
   }
1957
1959
1960
   key = png_ptr->chunkdata;
1958
   key[slength] = 0x00;
1961
   key[slength] = 0x00;
1959
1962
1960
   for (text = key; *text; text++)
1963
   for (text = key; *text; text++)
1961
      /* empty loop to find end of key */ ;
1964
      /* empty loop to find end of key */ ;
Lines 1967-1975 Link Here
1967
      (png_uint_32)png_sizeof(png_text));
1970
      (png_uint_32)png_sizeof(png_text));
1968
   if (text_ptr == NULL)
1971
   if (text_ptr == NULL)
1969
   {
1972
   {
1970
     png_warning(png_ptr, "Not enough memory to process text chunk.");
1973
     png_warning(png_ptr, "Not enough memory to process text chunk.");
1971
     png_free(png_ptr, key);
1974
     png_free(png_ptr, png_ptr->chunkdata);
1975
     png_ptr->chunkdata = NULL;
1972
     return;
1976
     return;
1973
   }
1977
   }
1974
   text_ptr->compression = PNG_TEXT_COMPRESSION_NONE;
1978
   text_ptr->compression = PNG_TEXT_COMPRESSION_NONE;
1975
   text_ptr->key = key;
1979
   text_ptr->key = key;
Lines 1982-1990 Link Here
1982
   text_ptr->text_length = png_strlen(text);
1986
   text_ptr->text_length = png_strlen(text);
1983
1987
1984
   ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1);
1988
   ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1);
1985
1989
1986
   png_free(png_ptr, key);
1990
   png_free(png_ptr, png_ptr->chunkdata);
1991
   png_ptr->chunkdata = NULL;
1987
   png_free(png_ptr, text_ptr);
1992
   png_free(png_ptr, text_ptr);
1988
   if (ret)
1993
   if (ret)
1989
     png_warning(png_ptr, "Insufficient memory to process text chunk.");
1994
     png_warning(png_ptr, "Insufficient memory to process text chunk.");
1990
}
1995
}

Return to bug 244808