summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-09-01 08:55:52 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-09-01 22:10:20 +0200
commitf560a3a296871084801ced75fae20fb5f1b5d7ce (patch)
tree22f01468587e1c8cc8fbd138981d68403ae29f3b
parente25ba7dc57229d1cb9794abd1ca23c0d87ebecb3 (diff)
ofz: MemorySanitizer: use-of-uninitialized-value
Change-Id: I481df54d421ad03813ba0755b735037e72d4c784 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121450 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/source/filter/imet/ios2met.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/filter/imet/ios2met.cxx b/vcl/source/filter/imet/ios2met.cxx
index 5be33dbc6f55..98b4c2bb82cc 100644
--- a/vcl/source/filter/imet/ios2met.cxx
+++ b/vcl/source/filter/imet/ios2met.cxx
@@ -1660,10 +1660,10 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
OSPath* p=pPathList;
pOS2MET->SeekRel(2);
pOS2MET->ReadUInt32( nID );
- while (p!=nullptr && p->nID!=nID)
- p=p->pSucc;
+ while (p && pOS2MET->good() && p->nID != nID)
+ p = p->pSucc;
- if( p!=nullptr )
+ if (p)
{
SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
SetRasterOp(aAttr.eLinMix);