[libng16] Attempt to stop Use of Uninitialized Value in png_set_text_2()

This commit is contained in:
Glenn Randers-Pehrson 2017-09-15 16:44:20 -05:00
parent d1a0937cae
commit 04e16d2817

View File

@ -811,6 +811,7 @@ png_set_text_2(png_const_structrp png_ptr, png_inforp info_ptr,
new_text = png_voidcast(png_textp,png_realloc_array(png_ptr, new_text = png_voidcast(png_textp,png_realloc_array(png_ptr,
info_ptr->text, old_num_text, max_text-old_num_text, info_ptr->text, old_num_text, max_text-old_num_text,
sizeof *new_text)); sizeof *new_text));
new_text[0].text[0]='\0'; /* to stop oss-fuzz complaint below */
} }
if (new_text == NULL) if (new_text == NULL)