Apply CVE-2016-10087 fix null-pointer-dereference bug in png_set_text_2()
[platform/upstream/libpng.git] / png.c
diff --git a/png.c b/png.c
old mode 100644 (file)
new mode 100755 (executable)
index 1d1bde5..4a9d85c
--- a/png.c
+++ b/png.c
@@ -477,6 +477,7 @@ png_free_data(png_const_structrp png_ptr, png_inforp info_ptr, png_uint_32 mask,
          png_free(png_ptr, info_ptr->text);
          info_ptr->text = NULL;
          info_ptr->num_text = 0;
+         info_ptr->max_text = 0;
       }
    }
 #endif