[Libreoffice-commits] core.git: sd/source
Mark Wielaard
mark at klomp.org
Mon Jul 8 04:58:38 PDT 2013
sd/source/filter/ppt/propread.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 78587a7e6a3330bf793fd2a43d258f8a5bac569e
Author: Mark Wielaard <mark at klomp.org>
Date: Sun Jul 7 22:14:50 2013 +0200
Robustify PropItem::Read.
Initialize nType and nItemSize variables in case stream is faulty.
Change-Id: I59602f2b04e3816d8de7cc1a5e7e526c8e822477
Reviewed-on: https://gerrit.libreoffice.org/4762
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx
index 2129ea0..6798915 100644
--- a/sd/source/filter/ppt/propread.cxx
+++ b/sd/source/filter/ppt/propread.cxx
@@ -82,10 +82,14 @@ sal_Bool PropItem::Read( OUString& rString, sal_uInt32 nStringType, sal_Bool bAl
nItemPos = Tell();
if ( nStringType == VT_EMPTY )
+ {
+ nType = VT_NULL; // Initialize in case stream fails.
*this >> nType;
+ }
else
nType = nStringType & VT_TYPEMASK;
+ nItemSize = 0; // Initialize in case stream fails.
*this >> nItemSize;
switch( nType )
More information about the Libreoffice-commits
mailing list