| OLD | NEW |
| 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.44 [June 26, 2010] | 4 * Last changed in libpng 1.2.44 [June 26, 2010] |
| 5 * Copyright (c) 1998-2010 Glenn Randers-Pehrson | 5 * Copyright (c) 1998-2010 Glenn Randers-Pehrson |
| 6 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) | 6 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) |
| 7 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) | 7 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) |
| 8 * | 8 * |
| 9 * This code is released under the libpng license. | 9 * This code is released under the libpng license. |
| 10 * For conditions of distribution and use, see the disclaimer | 10 * For conditions of distribution and use, see the disclaimer |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 | 352 |
| 353 /* If the size is zero either there was an error and a message | 353 /* If the size is zero either there was an error and a message |
| 354 * has already been output (warning) or the size really is zero | 354 * has already been output (warning) or the size really is zero |
| 355 * and we have nothing to do - the code will exit through the | 355 * and we have nothing to do - the code will exit through the |
| 356 * error case below. | 356 * error case below. |
| 357 */ | 357 */ |
| 358 #if defined(PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED) || \ | 358 #if defined(PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED) || \ |
| 359 defined(PNG_USER_CHUNK_MALLOC_MAX) | 359 defined(PNG_USER_CHUNK_MALLOC_MAX) |
| 360 else | 360 else |
| 361 #endif | 361 #endif |
| 362 if (expanded_size > 0 | 362 if (expanded_size > 0) |
| 363 { | 363 { |
| 364 /* Success (maybe) - really uncompress the chunk. */ | 364 /* Success (maybe) - really uncompress the chunk. */ |
| 365 png_size_t new_size = 0; | 365 png_size_t new_size = 0; |
| 366 png_charp text = png_malloc_warn(png_ptr, | 366 png_charp text = png_malloc_warn(png_ptr, |
| 367 prefix_size + expanded_size + 1); | 367 prefix_size + expanded_size + 1); |
| 368 | 368 |
| 369 if (text != NULL) | 369 if (text != NULL) |
| 370 { | 370 { |
| 371 png_memcpy(text, png_ptr->chunkdata, prefix_size); | 371 png_memcpy(text, png_ptr->chunkdata, prefix_size); |
| 372 new_size = png_inflate(png_ptr, | 372 new_size = png_inflate(png_ptr, |
| (...skipping 2998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3371 png_debug1(3, "height = %lu,", png_ptr->height); | 3371 png_debug1(3, "height = %lu,", png_ptr->height); |
| 3372 png_debug1(3, "iwidth = %lu,", png_ptr->iwidth); | 3372 png_debug1(3, "iwidth = %lu,", png_ptr->iwidth); |
| 3373 png_debug1(3, "num_rows = %lu,", png_ptr->num_rows); | 3373 png_debug1(3, "num_rows = %lu,", png_ptr->num_rows); |
| 3374 png_debug1(3, "rowbytes = %lu,", png_ptr->rowbytes); | 3374 png_debug1(3, "rowbytes = %lu,", png_ptr->rowbytes); |
| 3375 png_debug1(3, "irowbytes = %lu", | 3375 png_debug1(3, "irowbytes = %lu", |
| 3376 PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1); | 3376 PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1); |
| 3377 | 3377 |
| 3378 png_ptr->flags |= PNG_FLAG_ROW_INIT; | 3378 png_ptr->flags |= PNG_FLAG_ROW_INIT; |
| 3379 } | 3379 } |
| 3380 #endif /* PNG_READ_SUPPORTED */ | 3380 #endif /* PNG_READ_SUPPORTED */ |
| OLD | NEW |