From d7edcc40e49d76636ec7a19e0e23359e6d3db9c1 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Wed, 13 Sep 2017 19:34:51 -0500 Subject: [PATCH] [libpng16] Undo failed attempt to debug UMR in png_set_text_2(). --- pngset.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/pngset.c b/pngset.c index 7498b6764..e622fdde5 100644 --- a/pngset.c +++ b/pngset.c @@ -837,9 +837,6 @@ png_set_text_2(png_const_structrp png_ptr, png_inforp info_ptr, size_t lang_len, lang_key_len; png_textp textp = &(info_ptr->text[info_ptr->num_text]); - int text_is_null=0; - int text_0_is_0=0; - if (text_ptr[i].key == NULL) continue; @@ -884,13 +881,8 @@ png_set_text_2(png_const_structrp png_ptr, png_inforp info_ptr, } # endif - if (text_ptr[i].text == NULL) - text_is_null=1; - else if (text_ptr[i].text[0] == '\0') /* FIX THIS */ - text_0_is_0=1; - - /* oss-fuzz complains of UMR on the reference to text_0_is_0 */ - if (text_is_null || text_0_is_0) + /* oss-fuzz complains of UMR here */ + if (text_ptr[i].text == NULL || text_ptr[i].text[0] == '\0') { text_length = 0; # ifdef PNG_iTXt_SUPPORTED