summaryrefslogtreecommitdiff
path: root/splash
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2014-03-27 16:49:57 +0100
committerAlbert Astals Cid <aacid@kde.org>2014-03-27 16:50:13 +0100
commit3e7779935ec2610410bc4a42e9b0174e41ca9672 (patch)
tree467c4ba2b31410596052f7632cbebd5054564f36 /splash
parent23ad7fa5253a4fec6543d1435827aa1b59b62ced (diff)
Fix error reported by ASAN in 139.asan.0.581.pdf
==15244== ERROR: AddressSanitizer: SEGV on unknown address 0x605df000f3ee (pc 0x7f1087b3a22e sp 0x7fffec30ff20 bp 0x7fffec30ff80 T0) AddressSanitizer can not provide additional info. #0 0x7f1087b3a22d (/home/tsdgeos/devel/poppler/build-debug/libpoppler.so.46.0.0+0x48f22d) #1 0x7f1087b19d92 (/home/tsdgeos/devel/poppler/build-debug/libpoppler.so.46.0.0+0x46ed92) #2 0x7f1087ae570b (/home/tsdgeos/devel/poppler/build-debug/libpoppler.so.46.0.0+0x43a70b) #3 0x7f1087ae4061 (/home/tsdgeos/devel/poppler/build-debug/libpoppler.so.46.0.0+0x439061) #4 0x7f1087ab9b38 (/home/tsdgeos/devel/poppler/build-debug/libpoppler.so.46.0.0+0x40eb38) #5 0x7f1087900989 (/home/tsdgeos/devel/poppler/build-debug/libpoppler.so.46.0.0+0x255989) #6 0x7f10878f733a (/home/tsdgeos/devel/poppler/build-debug/libpoppler.so.46.0.0+0x24c33a) #7 0x7f10878f650f (/home/tsdgeos/devel/poppler/build-debug/libpoppler.so.46.0.0+0x24b50f) #8 0x7f10878f6163 (/home/tsdgeos/devel/poppler/build-debug/libpoppler.so.46.0.0+0x24b163) #9 0x7f10879d8dd1 (/home/tsdgeos/devel/poppler/build-debug/libpoppler.so.46.0.0+0x32ddd1) #10 0x7f10879e02fd (/home/tsdgeos/devel/poppler/build-debug/libpoppler.so.46.0.0+0x3352fd) #11 0x40311e (/home/tsdgeos/devel/poppler/build-debug/utils/pdftoppm+0x40311e) #12 0x404416 (/home/tsdgeos/devel/poppler/build-debug/utils/pdftoppm+0x404416) #13 0x7f1087000ec4 (/lib/x86_64-linux-gnu/libc-2.19.so+0x21ec4) #14 0x401d58 (/home/tsdgeos/devel/poppler/build-debug/utils/pdftoppm+0x401d58)
Diffstat (limited to 'splash')
-rw-r--r--splash/SplashXPathScanner.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/splash/SplashXPathScanner.cc b/splash/SplashXPathScanner.cc
index 0fd5ccdc..52ac1c27 100644
--- a/splash/SplashXPathScanner.cc
+++ b/splash/SplashXPathScanner.cc
@@ -11,7 +11,7 @@
// All changes made under the Poppler project to this file are licensed
// under GPL version 2 or later
//
-// Copyright (C) 2008, 2010 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2008, 2010, 2014 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2010 PaweĊ‚ Wiejacha <pawel.wiejacha@gmail.com>
// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
//
@@ -514,7 +514,7 @@ void SplashXPathScanner::clipAALine(SplashBitmap *aaBuf,
xx0 = (*x1 + 1) * splashAASize;
if (xx0 > aaBuf->getWidth()) xx0 = aaBuf->getWidth();
// set [xx, xx0) to 0
- if (xx < xx0) {
+ if (xx < xx0 && xx >= 0) {
p = aaBuf->getDataPtr() + yy * aaBuf->getRowSize() + (xx >> 3);
if (xx & 7) {
mask = (Guchar)(0xff00 >> (xx & 7));