[Libreoffice-commits] core.git: embeddedobj/source
Caolán McNamara
caolanm at redhat.com
Mon Jan 23 10:53:09 UTC 2017
embeddedobj/source/msole/oleembed.cxx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit da55a0e5158e14c3743b186d3b1d4022a278e4d5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jan 23 10:50:10 2017 +0000
Ole10Native payload truncated
Change-Id: If2c0c2788e54eb01a1b6998c81df016061a0ad6b
diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx
index 2f8d3fa..a28786f 100644
--- a/embeddedobj/source/msole/oleembed.cxx
+++ b/embeddedobj/source/msole/oleembed.cxx
@@ -759,11 +759,11 @@ namespace
} while (nRead == 1 && aData[0] != 0); // Actual string representing the file path
uno::Sequence< sal_Int8 > aLenData(4);
xIn->readBytes(aLenData, 4); //len of attachment
- sal_uInt32 nLen = static_cast<sal_uInt32>
- ((sal_uInt32)aLenData[0]
- + ((sal_uInt32)aLenData[1] << 8)
- + ((sal_uInt32)aLenData[2] << 16)
- + ((sal_uInt32)aLenData[3] << 24));
+ sal_uInt32 nLen = static_cast<sal_uInt32>(
+ (aLenData[0] & 0xFF) |
+ ((aLenData[1] & 0xFF) << 8) |
+ ((aLenData[2] & 0xFF) << 16) |
+ ((aLenData[3] & 0xFF) << 24));
bCopied = lcl_CopyStream(xIn, xStream->getOutputStream(), nLen);
}
More information about the Libreoffice-commits
mailing list