[Libreoffice-commits] core.git: include/vcl
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sun Mar 8 14:08:50 UTC 2020
include/vcl/BitmapTools.hxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 1e95c2c17a49349caba1e62b4de3752c5f767f01
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Mar 7 19:24:42 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Mar 8 15:08:10 2020 +0100
ofz#20622 oom
Change-Id: Id77d90197e98d29787a40966f248dd769c9dac28
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90175
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/vcl/BitmapTools.hxx b/include/vcl/BitmapTools.hxx
index 4e3efbcef84f..6d7c8c930472 100644
--- a/include/vcl/BitmapTools.hxx
+++ b/include/vcl/BitmapTools.hxx
@@ -53,7 +53,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();
}
More information about the Libreoffice-commits
mailing list