summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-11-11 15:10:30 +0000
committerAndras Timar <andras.timar@collabora.com>2017-11-27 12:55:08 +0100
commit3e2aeb61db631a6e2cce0e9d9df2e70db2540c0e (patch)
tree1246c3d0b759cd253fbdc6b070171e0f7c4b228a /vcl
parentac95841c345c414ddc2d20880302bce75b8e1096 (diff)
ofz: XPMReader::ImplGetColKey short read
like commit 10a2388558df957b30136ba32ecc97ddef43fb57 Date: Tue Jan 17 12:35:24 2017 +0000 ofz#411: XPMReader::ImplGetColKey short read Change-Id: Iffc7ddb00b2849b2f9fad17314086b87d3097660 Reviewed-on: https://gerrit.libreoffice.org/44629 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com> (cherry picked from commit e02f068b9719c89d7aac1aaf4bb650160a3a3aed)
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/ixpm/xpmread.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/source/filter/ixpm/xpmread.cxx b/vcl/source/filter/ixpm/xpmread.cxx
index 6aaaa1c828ee..f72ff950ca66 100644
--- a/vcl/source/filter/ixpm/xpmread.cxx
+++ b/vcl/source/filter/ixpm/xpmread.cxx
@@ -457,6 +457,9 @@ bool XPMReader::ImplGetColKey( sal_uInt8 nKey )
{
sal_uInt8 nTemp, nPrev = ' ';
+ if (mnStringSize < mnCpp + 1)
+ return false;
+
mpPara = mpStringBuf + mnCpp + 1;
mnParaSize = 0;