[poppler] poppler/Form.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Feb 20 21:24:47 UTC 2021


 poppler/Form.cc |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 5d08242584215a5ccf6201b94ca00d96f48c9c54
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sat Feb 20 22:19:08 2021 +0100

    Fix leak in case of fread failing

diff --git a/poppler/Form.cc b/poppler/Form.cc
index 06855785..9937eefd 100644
--- a/poppler/Form.cc
+++ b/poppler/Form.cc
@@ -511,6 +511,7 @@ static bool hashFileRange(FILE *f, SignatureHandler *handler, Goffset start, Gof
         if (end - start < len)
             len = end - start;
         if (fread(buf, 1, len, f) != static_cast<size_t>(len)) {
+            delete[] buf;
             return false;
         }
         handler->updateHash(buf, len);


More information about the poppler mailing list