diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-23 10:50:10 +0000 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-01-25 15:04:33 +0000 |
commit | 56f2d3728b74e39b658cd1c59a55b4b338ea230d (patch) | |
tree | 5a0424226fc57f15ebd678d689a678af2838a170 /embeddedobj | |
parent | 6ed838bfd59ae4db7822daf60ef12cb023799a75 (diff) |
Ole10Native payload truncated
Change-Id: If2c0c2788e54eb01a1b6998c81df016061a0ad6b
(cherry picked from commit da55a0e5158e14c3743b186d3b1d4022a278e4d5)
Reviewed-on: https://gerrit.libreoffice.org/33450
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
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 c15962cd024a..2faed0ba62be 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); } |