提交 7ee802a5 编写于 作者: G Glenn Randers-Pehrson

[libpng16] Initialize trans_color.red, green, and blue == trans_color.gray

in attempt to stop an oss-fuzz "use of ininitialized value" issue
上级 2f8b82eb
...@@ -29,6 +29,7 @@ Version 1.6.35beta01 [October 29, 2017] ...@@ -29,6 +29,7 @@ Version 1.6.35beta01 [October 29, 2017]
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
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
......
...@@ -6045,6 +6045,7 @@ Version 1.6.35beta01 [October 29, 2017] ...@@ -6045,6 +6045,7 @@ Version 1.6.35beta01 [October 29, 2017]
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
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
......
...@@ -1852,6 +1852,9 @@ png_handle_tRNS(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) ...@@ -1852,6 +1852,9 @@ png_handle_tRNS(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
png_crc_read(png_ptr, buf, 2); png_crc_read(png_ptr, buf, 2);
png_ptr->num_trans = 1; png_ptr->num_trans = 1;
png_ptr->trans_color.gray = png_get_uint_16(buf); png_ptr->trans_color.gray = png_get_uint_16(buf);
png_ptr->trans_color.red = png_ptr->trans_color.gray;
png_ptr->trans_color.green = png_ptr->trans_color.gray;
png_ptr->trans_color.blue = png_ptr->trans_color.gray;
} }
else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB) else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册