diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-23 10:50:10 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-23 10:52:23 +0000 |
commit | da55a0e5158e14c3743b186d3b1d4022a278e4d5 (patch) | |
tree | 7530e7fec21f4adee15ed8223cfa7fcab1d8038e /embeddedobj | |
parent | 7e5c140dd9816b30a1fa7d65200c1487d7e374d2 (diff) |
Ole10Native payload truncated
Change-Id: If2c0c2788e54eb01a1b6998c81df016061a0ad6b
Diffstat (limited to 'embeddedobj')
-rw-r--r-- | embeddedobj/source/msole/oleembed.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index 2f8d3fab4f54..a28786f05f9b 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); } |