15bec5421Sopenharmony_ciFrom a0ca4293454ef65e67efca5dc440c601d2835e90 Mon Sep 17 00:00:00 2001
25bec5421Sopenharmony_ciFrom: tangyaofang <tangyaofang6666@163.com>
35bec5421Sopenharmony_ciDate: Mon, 10 Jun 2019 11:30:15 +0800
45bec5421Sopenharmony_ciSubject: [PATCH] Repair of CVE-2019-6129
55bec5421Sopenharmony_ci
65bec5421Sopenharmony_ci---
75bec5421Sopenharmony_ci contrib/tools/pngcp.c | 2 +-
85bec5421Sopenharmony_ci 1 file changed, 1 insertion(+), 1 deletion(-)
95bec5421Sopenharmony_ci
105bec5421Sopenharmony_cidiff --git a/contrib/tools/pngcp.c b/contrib/tools/pngcp.c
115bec5421Sopenharmony_ciindex 16d4e7f4d..a02d5b7ff 100644
125bec5421Sopenharmony_ci--- a/contrib/tools/pngcp.c
135bec5421Sopenharmony_ci+++ b/contrib/tools/pngcp.c
145bec5421Sopenharmony_ci@@ -506,7 +506,7 @@ static void
155bec5421Sopenharmony_ci display_clean_read(struct display *dp)
165bec5421Sopenharmony_ci {
175bec5421Sopenharmony_ci    if (dp->read_pp != NULL)
185bec5421Sopenharmony_ci-      png_destroy_read_struct(&dp->read_pp, NULL, NULL);
195bec5421Sopenharmony_ci+      png_destroy_read_struct(&dp->read_pp, (dp->ip!=NULL ? &dp->ip : NULL), NULL);
205bec5421Sopenharmony_ci 
215bec5421Sopenharmony_ci    if (dp->fp != NULL)
225bec5421Sopenharmony_ci    {
235bec5421Sopenharmony_ci
24