[poppler] poppler/PSOutputDev.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Dec 10 09:48:14 UTC 2021


 poppler/PSOutputDev.cc |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit e73a2b3a0a93f60c4e90933f930f506df20935bd
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri Dec 10 10:42:22 2021 +0100

    PSOutputDev::startPage: Fix potential integer overflow

diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index 972945f1..140bde80 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -3708,7 +3708,10 @@ void PSOutputDev::startPage(int pageNum, GfxState *state, XRef *xrefA)
             error(errSyntaxError, -1, "width too big");
             return;
         }
-        height = y2 - y1;
+        if (unlikely(checkedSubtraction(y2, y1, &height))) {
+            error(errSyntaxError, -1, "height too big");
+            return;
+        }
         tx = ty = 0;
         // rotation and portrait/landscape mode
         if (paperMatch) {


More information about the poppler mailing list