summaryrefslogtreecommitdiff
path: root/sd/source/filter/ppt/propread.cxx
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2013-07-07 22:14:50 +0200
committerMichael Stahl <mstahl@redhat.com>2013-07-08 11:58:16 +0000
commit78587a7e6a3330bf793fd2a43d258f8a5bac569e (patch)
tree72e97e986d3389e4025e8b03be77c32fda4c873a /sd/source/filter/ppt/propread.cxx
parentfb1931f94724703243c31e6be72267c327052f56 (diff)
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@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sd/source/filter/ppt/propread.cxx')
-rw-r--r--sd/source/filter/ppt/propread.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx
index 2129ea003665..6798915c7d02 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 )