vcl/source/filter/png/PngImageReader.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit a0e92a64a9a6069ee21336888f3781ffe144b2df Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Aug 23 20:17:42 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Aug 24 09:35:37 2021 +0200 ofz: MemorySanitizer: use-of-uninitialized-value Change-Id: I768cec434ee20e6e46eb3993c873bed05b3c9cc3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120925 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/filter/png/PngImageReader.cxx b/vcl/source/filter/png/PngImageReader.cxx index c4e04ad0f1d8..e3b3703c1cab 100644 --- a/vcl/source/filter/png/PngImageReader.cxx +++ b/vcl/source/filter/png/PngImageReader.cxx @@ -55,8 +55,8 @@ bool isPng(SvStream& rStream) { // Check signature bytes sal_uInt8 aHeader[PNG_SIGNATURE_SIZE]; - rStream.ReadBytes(aHeader, PNG_SIGNATURE_SIZE); - + if (rStream.ReadBytes(aHeader, PNG_SIGNATURE_SIZE) != PNG_SIGNATURE_SIZE) + return false; return png_sig_cmp(aHeader, 0, PNG_SIGNATURE_SIZE) == 0; }