[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Sep 1 09:18:21 UTC 2021
vcl/source/filter/GraphicFormatDetector.cxx | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
New commits:
commit b3e7d61278701ffcc5330e8d65cf9e78991a1754
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Aug 31 17:11:25 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Sep 1 11:17:49 2021 +0200
ofz: MemorySanitizer: use-of-uninitialized-value
Change-Id: Iebbc5c690231966960a5dd00908a0a4e1bf15bb4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121400
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/filter/GraphicFormatDetector.cxx b/vcl/source/filter/GraphicFormatDetector.cxx
index fc4db66f2031..df7cc1fb03d4 100644
--- a/vcl/source/filter/GraphicFormatDetector.cxx
+++ b/vcl/source/filter/GraphicFormatDetector.cxx
@@ -769,9 +769,8 @@ bool GraphicFormatDetector::checkTGA()
mrStream.Seek(STREAM_SEEK_TO_END);
mrStream.SeekRel(-18);
- mrStream.ReadBytes(sFooterBytes, 18);
-
- if (memcmp(sFooterBytes, "TRUEVISION-XFILE.", SAL_N_ELEMENTS(sFooterBytes)) == 0)
+ if (mrStream.ReadBytes(sFooterBytes, 18) == 18
+ && memcmp(sFooterBytes, "TRUEVISION-XFILE.", SAL_N_ELEMENTS(sFooterBytes)) == 0)
{
msDetectedFormat = "TGA";
return true;
More information about the Libreoffice-commits
mailing list