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

New commits:
commit 5d08242584215a5ccf6201b94ca00d96f48c9c54
Author: Albert Astals Cid <[email protected]>
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);
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to