diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/BitmapTools.hxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/vcl/BitmapTools.hxx b/include/vcl/BitmapTools.hxx index 6a8f6c8b9605..3f4847609d30 100644 --- a/include/vcl/BitmapTools.hxx +++ b/include/vcl/BitmapTools.hxx @@ -45,7 +45,8 @@ public: assert(nBitCount == 24 || nBitCount == 32); sal_Int32 nRowSize, nDataSize; if (o3tl::checked_multiply<sal_Int32>(rSize.getWidth(), nBitCount/8, nRowSize) || - o3tl::checked_multiply<sal_Int32>(nRowSize, rSize.getHeight(), nDataSize)) + o3tl::checked_multiply<sal_Int32>(nRowSize, rSize.getHeight(), nDataSize) || + nDataSize < 0) { throw std::bad_alloc(); } |