summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/filter/GraphicFormatDetector.cxx5
1 files changed, 2 insertions, 3 deletions
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;