From ee1d3fce6b1fe42ed70a99511ee18785e987da0f Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 3 Feb 2022 09:08:57 +0000 Subject: ofz#44303 Null-dereference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I2202ca853edea29e987e920b1f8bf65ca622291e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129397 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- vcl/source/filter/webp/reader.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'vcl') diff --git a/vcl/source/filter/webp/reader.cxx b/vcl/source/filter/webp/reader.cxx index 5ec8fa4870c2..3c0b1399cad2 100644 --- a/vcl/source/filter/webp/reader.cxx +++ b/vcl/source/filter/webp/reader.cxx @@ -89,6 +89,8 @@ static bool readWebp(SvStream& stream, Graphic& graphic) } BitmapScopedWriteAccess access(bitmap); + if (!access) + return false; // If data cannot be read directly into the bitmap, read data first to this buffer and then convert. std::vector tmpRgbaData; enum class PixelMode -- cgit