[libpng16] Removed some unnecessary brackets in pngrtran.c

This commit is contained in:
Glenn Randers-Pehrson 2017-10-31 20:57:23 -05:00
parent 5d7b4ab289
commit 4b52ef8e76
3 changed files with 878 additions and 883 deletions

View File

@ -1,4 +1,4 @@
Libpng 1.6.35beta01 - October 29, 2017 Libpng 1.6.35beta01 - November 1, 2017
This is not intended to be a public release. It will be replaced This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version. within a few weeks by a public version or by another test version.
@ -24,12 +24,12 @@ Other information:
Changes since the last public release (1.6.34): Changes since the last public release (1.6.34):
Version 1.6.35beta01 [October 29, 2017] Version 1.6.35beta01 [November 1, 2017]
Restored 21 of the contrib/pngsuite/i*.png, which do not cause test Restored 21 of the contrib/pngsuite/i*.png, which do not cause test
failures. Placed the remainder in contrib/pngsuite/interlaced/i*.png. failures. Placed the remainder in contrib/pngsuite/interlaced/i*.png.
Added calls to png_set_*() transforms commonly used by browsers to Added calls to png_set_*() transforms commonly used by browsers to
the fuzzer. the fuzzer.
Initialize trans_color.red, green, and blue == trans_color.gray Removed some unnecessary brackets in pngrtran.c
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

View File

@ -6038,14 +6038,14 @@ Version 1.6.33 [September 28, 2017]
Add end_info structure and png_read_end() to the libpng fuzzer. Add end_info structure and png_read_end() to the libpng fuzzer.
Version 1.6.34 [September 29, 2017] Version 1.6.34 [September 29, 2017]
Removed contrib/pngsuite/i*.png; some of caused test failures. Removed contrib/pngsuite/i*.png; some of them caused test failures.
Version 1.6.35beta01 [October 29, 2017] Version 1.6.35beta01 [November 1, 2017]
Restored 21 of the contrib/pngsuite/i*.png, which do not cause test Restored 21 of the contrib/pngsuite/i*.png, which do not cause test
failures. Placed the remainder in contrib/pngsuite/interlaced/i*.png. failures. Placed the remainder in contrib/pngsuite/interlaced/i*.png.
Added calls to png_set_*() transforms commonly used by browsers to Added calls to png_set_*() transforms commonly used by browsers to
the fuzzer. the fuzzer.
Initialize trans_color.red, green, and blue == trans_color.gray Removed some unnecessary brackets in pngrtran.c
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

View File

@ -1,7 +1,7 @@
/* pngrtran.c - transforms the data in a row for PNG readers /* pngrtran.c - transforms the data in a row for PNG readers
* *
* Last changed in libpng 1.6.33 [September 28, 2017] * Last changed in libpng 1.6.35 [(PENDING RELEASE)]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson * Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -2463,10 +2463,10 @@ png_do_chop(png_row_infop row_info, png_bytep row)
static void static void
png_do_read_swap_alpha(png_row_infop row_info, png_bytep row) png_do_read_swap_alpha(png_row_infop row_info, png_bytep row)
{ {
png_uint_32 row_width = row_info->width;
png_debug(1, "in png_do_read_swap_alpha"); png_debug(1, "in png_do_read_swap_alpha");
{
png_uint_32 row_width = row_info->width;
if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
{ {
/* This converts from RGBA to ARGB */ /* This converts from RGBA to ARGB */
@ -2552,7 +2552,6 @@ png_do_read_swap_alpha(png_row_infop row_info, png_bytep row)
} }
#endif #endif
} }
}
} }
#endif #endif
@ -3209,7 +3208,6 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
png_debug(1, "in png_do_compose"); png_debug(1, "in png_do_compose");
{
switch (row_info->color_type) switch (row_info->color_type)
{ {
case PNG_COLOR_TYPE_GRAY: case PNG_COLOR_TYPE_GRAY:
@ -3923,7 +3921,6 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
default: default:
break; break;
} }
}
} }
#endif /* READ_BACKGROUND || READ_ALPHA_MODE */ #endif /* READ_BACKGROUND || READ_ALPHA_MODE */
@ -4365,7 +4362,6 @@ png_do_expand(png_row_infop row_info, png_bytep row,
png_debug(1, "in png_do_expand"); png_debug(1, "in png_do_expand");
{
if (row_info->color_type == PNG_COLOR_TYPE_GRAY) if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
{ {
unsigned int gray = trans_color != NULL ? trans_color->gray : 0; unsigned int gray = trans_color != NULL ? trans_color->gray : 0;
@ -4578,7 +4574,6 @@ png_do_expand(png_row_infop row_info, png_bytep row,
row_info->pixel_depth = (png_byte)(row_info->bit_depth << 2); row_info->pixel_depth = (png_byte)(row_info->bit_depth << 2);
row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
} }
}
} }
#endif #endif