diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-10-23 11:40:12 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-10-23 11:40:43 +0300 |
commit | 4aa33cae65dd90f60873922dfb0c3f9b106537f9 (patch) | |
tree | 61fcbef064041b81bc56a727670b7f4c9c8c66de /svtools | |
parent | 96365ae6e670678919951859f4ddc61e86a5df02 (diff) |
Make loading CVE-2008-5937-1.gif fail (as expected) also on 64-bit Mac OS X
Change-Id: Ia300ebf0c1365699869f386c7257519bcedf2687
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/filter/igif/gifread.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/svtools/source/filter/igif/gifread.cxx b/svtools/source/filter/igif/gifread.cxx index 5f91b61c81ed..8d41882e7051 100644 --- a/svtools/source/filter/igif/gifread.cxx +++ b/svtools/source/filter/igif/gifread.cxx @@ -96,6 +96,20 @@ sal_Bool GIFReader::CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPa { const Size aSize( nWidth, nHeight ); +#ifdef __LP64__ + // Don't bother allocating a bitmap of a size that would fail on a + // 32-bit system. We have at least one unit tests that is expected + // to fail (loading a 65535*65535 size GIF + // svtools/qa/cppunit/data/gif/fail/CVE-2008-5937-1.gif), but + // which doesn't fail on 64-bit Mac OS X at least. Why the loading + // fails on 64-bit Linux, no idea. + if (nWidth >= 64000 && nHeight >= 64000) + { + bStatus = sal_False; + return bStatus; + } +#endif + if( bGCTransparent ) { const Color aWhite( COL_WHITE ); |