[poppler] 2 commits - .gitlab-ci.yml poppler/DCTStream.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Dec 21 08:13:17 UTC 2020


 .gitlab-ci.yml       |    1 +
 poppler/DCTStream.cc |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 52808e8d56606d009a2cb15a1963fe87ff29e040
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sun Dec 20 23:39:40 2020 +0100

    CI: Use clazy from debian:testing for now, unstable is broken

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c99520d5..6e998610 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -82,6 +82,7 @@ build_mingw64_fedora:
 
 build_clazy:
   stage: build
+  image: debian:testing
   script:
     - apt-get install --yes --no-install-recommends clazy
     - mkdir -p build && cd build
commit ae614bf8ab42c9d0c7ac57ecdfdcbcfc4ff6c639
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sun Dec 20 23:15:12 2020 +0100

    Fix DCTStream::getChars we're reading past the buffer check
    
    I wonder how this had never crashed before :S
    
    Fixes #1011

diff --git a/poppler/DCTStream.cc b/poppler/DCTStream.cc
index f4692557..4186a3fe 100644
--- a/poppler/DCTStream.cc
+++ b/poppler/DCTStream.cc
@@ -218,8 +218,8 @@ int DCTStream::getChars(int nChars, unsigned char *buffer)
                 return i;
         }
         int left = limit - current;
-        if (nChars < left)
-            left = nChars;
+        if (left + i > nChars)
+            left = nChars - i;
         memcpy(buffer + i, current, left);
         current += left;
         i += left;


More information about the poppler mailing list