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

(-)libpng-1.2.26/png.h (+3 lines)
Lines 180-187 Link Here
180
 *    1.0.31                  10    10031  10.so.0.31[.0]
180
 *    1.0.31                  10    10031  10.so.0.31[.0]
181
 *    1.2.25                  13    10225  12.so.0.25[.0]
181
 *    1.2.25                  13    10225  12.so.0.25[.0]
182
 *    1.2.26beta01-06         13    10226  12.so.0.26[.0]
182
 *    1.2.26beta01-06         13    10226  12.so.0.26[.0]
183
 *    1.2.26rc01              13    10226  12.so.0.26[.0]
183
 *    1.2.26rc01              13    10226  12.so.0.26[.0]
184
 *    1.2.26                  13    10226  12.so.0.26[.0]
185
 *    1.0.32                  10    10032  10.so.0.32[.0]
186
 *    1.2.27beta01            13    10227  12.so.0.27[.0]
184
 *
187
 *
185
 *    Henceforth the source version will match the shared-library major
188
 *    Henceforth the source version will match the shared-library major
186
 *    and minor numbers; the shared-library major version number will be
189
 *    and minor numbers; the shared-library major version number will be
187
 *    used for changes in backward compatibility, as it is intended.  The
190
 *    used for changes in backward compatibility, as it is intended.  The
(-)libpng-1.2.26/pngpread.c (-5 / +13 lines)
Lines 1-8 Link Here
1
1
2
/* pngpread.c - read a png file in push mode
2
/* pngpread.c - read a png file in push mode
3
 *
3
 *
4
 * Last changed in libpng 1.2.26 [April 2, 2008]
4
 * Last changed in libpng 1.2.27 [April 6, 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 1501-1511 Link Here
1501
                 (png_charp)png_ptr->chunk_name, 
1501
                 (png_charp)png_ptr->chunk_name, 
1502
                 png_sizeof(png_ptr->unknown_chunk.name));
1502
                 png_sizeof(png_ptr->unknown_chunk.name));
1503
      png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name)-1]='\0';
1503
      png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name)-1]='\0';
1504
1504
1505
      png_ptr->unknown_chunk.data = (png_bytep)png_malloc(png_ptr, length);
1506
      png_ptr->unknown_chunk.size = (png_size_t)length;
1505
      png_ptr->unknown_chunk.size = (png_size_t)length;
1507
      png_crc_read(png_ptr, (png_bytep)png_ptr->unknown_chunk.data, length);
1506
      if (length == 0)
1507
         png_ptr->unknown_chunk.data = NULL;
1508
      else
1509
      {
1510
         png_ptr->unknown_chunk.data = (png_bytep)png_malloc(png_ptr, length);
1511
         png_crc_read(png_ptr, (png_bytep)png_ptr->unknown_chunk.data, length);
1512
      }
1508
#if defined(PNG_READ_USER_CHUNKS_SUPPORTED)
1513
#if defined(PNG_READ_USER_CHUNKS_SUPPORTED)
1509
      if(png_ptr->read_user_chunk_fn != NULL)
1514
      if(png_ptr->read_user_chunk_fn != NULL)
1510
      {
1515
      {
1511
         /* callback to user unknown chunk handler */
1516
         /* callback to user unknown chunk handler */
Lines 1526-1535 Link Here
1526
      }
1531
      }
1527
      else
1532
      else
1528
#endif
1533
#endif
1529
        png_set_unknown_chunks(png_ptr, info_ptr, &png_ptr->unknown_chunk, 1);
1534
        png_set_unknown_chunks(png_ptr, info_ptr, &png_ptr->unknown_chunk, 1);
1530
      png_free(png_ptr, png_ptr->unknown_chunk.data);
1535
      if (png_ptr->unknown_chunk.data)
1531
      png_ptr->unknown_chunk.data = NULL;
1536
      {
1537
        png_free(png_ptr, png_ptr->unknown_chunk.data);
1538
        png_ptr->unknown_chunk.data = NULL;
1539
      }
1532
   }
1540
   }
1533
   else
1541
   else
1534
#endif
1542
#endif
1535
      skip=length;
1543
      skip=length;
(-)libpng-1.2.26/pngrutil.c (-5 / +13 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.26 [April 2, 2008]
4
 * Last changed in libpng 1.2.27 [April 6, 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 2226-2236 Link Here
2226
       png_memcpy((png_charp)png_ptr->unknown_chunk.name,
2226
       png_memcpy((png_charp)png_ptr->unknown_chunk.name,
2227
                  (png_charp)png_ptr->chunk_name, 
2227
                  (png_charp)png_ptr->chunk_name, 
2228
                  png_sizeof(png_ptr->unknown_chunk.name));
2228
                  png_sizeof(png_ptr->unknown_chunk.name));
2229
       png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name)-1] = '\0';
2229
       png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name)-1] = '\0';
2230
       png_ptr->unknown_chunk.data = (png_bytep)png_malloc(png_ptr, length);
2231
       png_ptr->unknown_chunk.size = (png_size_t)length;
2230
       png_ptr->unknown_chunk.size = (png_size_t)length;
2232
       png_crc_read(png_ptr, (png_bytep)png_ptr->unknown_chunk.data, length);
2231
       if (length == 0)
2232
         png_ptr->unknown_chunk.data = NULL;
2233
       else
2234
       {
2235
         png_ptr->unknown_chunk.data = (png_bytep)png_malloc(png_ptr, length);
2236
         png_crc_read(png_ptr, (png_bytep)png_ptr->unknown_chunk.data, length);
2237
       }
2233
#if defined(PNG_READ_USER_CHUNKS_SUPPORTED)
2238
#if defined(PNG_READ_USER_CHUNKS_SUPPORTED)
2234
       if(png_ptr->read_user_chunk_fn != NULL)
2239
       if(png_ptr->read_user_chunk_fn != NULL)
2235
       {
2240
       {
2236
          /* callback to user unknown chunk handler */
2241
          /* callback to user unknown chunk handler */
Lines 2251-2260 Link Here
2251
       }
2256
       }
2252
       else
2257
       else
2253
#endif
2258
#endif
2254
         png_set_unknown_chunks(png_ptr, info_ptr, &png_ptr->unknown_chunk, 1);
2259
         png_set_unknown_chunks(png_ptr, info_ptr, &png_ptr->unknown_chunk, 1);
2255
       png_free(png_ptr, png_ptr->unknown_chunk.data);
2260
       if (png_ptr->unknown_chunk.data)
2256
       png_ptr->unknown_chunk.data = NULL;
2261
       {
2262
         png_free(png_ptr, png_ptr->unknown_chunk.data);
2263
         png_ptr->unknown_chunk.data = NULL;
2264
       }
2257
   }
2265
   }
2258
   else
2266
   else
2259
#endif
2267
#endif
2260
      skip = length;
2268
      skip = length;
(-)libpng-1.2.26/pngset.c (-20 / +23 lines)
Lines 1-8 Link Here
1
1
2
/* pngset.c - storage of image information into info struct
2
/* pngset.c - storage of image information into info struct
3
 *
3
 *
4
 * Last changed in libpng 1.2.25 [February 18, 2008]
4
 * Last changed in libpng 1.2.27 [April 6, 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 1039-1068 Link Here
1039
    info_ptr->unknown_chunks=NULL;
1039
    info_ptr->unknown_chunks=NULL;
1040
1040
1041
    for (i = 0; i < num_unknowns; i++)
1041
    for (i = 0; i < num_unknowns; i++)
1042
    {
1042
    {
1043
        png_unknown_chunkp to = np + info_ptr->unknown_chunks_num + i;
1043
       png_unknown_chunkp to = np + info_ptr->unknown_chunks_num + i;
1044
        png_unknown_chunkp from = unknowns + i;
1044
       png_unknown_chunkp from = unknowns + i;
1045
1045
1046
        png_memcpy((png_charp)to->name, 
1046
       png_memcpy((png_charp)to->name, 
1047
                   (png_charp)from->name, 
1047
                  (png_charp)from->name, 
1048
                   png_sizeof(from->name));
1048
                  png_sizeof(from->name));
1049
        to->name[png_sizeof(to->name)-1] = '\0';
1049
       to->name[png_sizeof(to->name)-1] = '\0';
1050
       to->size = from->size;
1051
       /* note our location in the read or write sequence */
1052
       to->location = (png_byte)(png_ptr->mode & 0xff);
1050
1053
1051
        to->data = (png_bytep)png_malloc_warn(png_ptr, from->size);
1054
       if (from->size == 0)
1052
        if (to->data == NULL)
1055
          to->data=NULL;
1053
        {
1056
       else
1054
           png_warning(png_ptr,
1057
       {
1058
          to->data = (png_bytep)png_malloc_warn(png_ptr, from->size);
1059
          if (to->data == NULL)
1060
          {
1061
             png_warning(png_ptr,
1055
              "Out of memory while processing unknown chunk.");
1062
              "Out of memory while processing unknown chunk.");
1056
        }
1063
             to->size=0;
1057
        else
1064
          }
1058
        {
1065
          else
1059
           png_memcpy(to->data, from->data, from->size);
1066
             png_memcpy(to->data, from->data, from->size);
1060
           to->size = from->size;
1067
       }
1061
1062
           /* note our location in the read or write sequence */
1063
           to->location = (png_byte)(png_ptr->mode & 0xff);
1064
        }
1065
    }
1068
    }
1066
1069
1067
    info_ptr->unknown_chunks = np;
1070
    info_ptr->unknown_chunks = np;
1068
    info_ptr->unknown_chunks_num += num_unknowns;
1071
    info_ptr->unknown_chunks_num += num_unknowns;
(-)libpng-1.2.26/pngwrite.c (+2 lines)
Lines 111-118 Link Here
111
            !(up->location & PNG_HAVE_IDAT) &&
111
            !(up->location & PNG_HAVE_IDAT) &&
112
            ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS ||
112
            ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS ||
113
            (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS)))
113
            (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS)))
114
         {
114
         {
115
            if (up->size == 0)
116
               png_warning(png_ptr, "Writing zero-length unknown chunk");
115
            png_write_chunk(png_ptr, up->name, up->data, up->size);
117
            png_write_chunk(png_ptr, up->name, up->data, up->size);
116
         }
118
         }
117
       }
119
       }
118
   }
120
   }

Return to bug 217047