1From a0ca4293454ef65e67efca5dc440c601d2835e90 Mon Sep 17 00:00:00 2001 2From: tangyaofang <tangyaofang6666@163.com> 3Date: Mon, 10 Jun 2019 11:30:15 +0800 4Subject: [PATCH] Repair of CVE-2019-6129 5 6--- 7 contrib/tools/pngcp.c | 2 +- 8 1 file changed, 1 insertion(+), 1 deletion(-) 9 10diff --git a/contrib/tools/pngcp.c b/contrib/tools/pngcp.c 11index 16d4e7f4d..a02d5b7ff 100644 12--- a/contrib/tools/pngcp.c 13+++ b/contrib/tools/pngcp.c 14@@ -506,7 +506,7 @@ static void 15 display_clean_read(struct display *dp) 16 { 17 if (dp->read_pp != NULL) 18- png_destroy_read_struct(&dp->read_pp, NULL, NULL); 19+ png_destroy_read_struct(&dp->read_pp, (dp->ip!=NULL ? &dp->ip : NULL), NULL); 20 21 if (dp->fp != NULL) 22 { 23 24