[poppler] poppler/GfxState.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Oct 17 21:08:16 UTC 2018


 poppler/GfxState.cc |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 8dc68b38874ed1b8f61c051b9b9a5c41d6dd60c2
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Oct 17 23:07:41 2018 +0200

    GfxFunctionShading::parse: Fix memory leak on broken files
    
    oss-fuzz/11020

diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
index b5ee150b..09fc9793 100644
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -3759,6 +3759,9 @@ GfxFunctionShading *GfxFunctionShading::parse(GfxResources *res, Dict *dict, Out
     for (i = 0; i < nFuncsA; ++i) {
       Object obj2 = obj1.arrayGet(i);
       if (!(funcsA[i] = Function::parse(&obj2))) {
+	for (int j = 0; j < i; ++j) {
+	  delete funcsA[j];
+	}
 	return nullptr;
       }
     }


More information about the poppler mailing list