diff options
-rw-r--r-- | vcl/source/filter/png/PngImageReader.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/filter/png/PngImageReader.cxx b/vcl/source/filter/png/PngImageReader.cxx index 56945e9d9c4b..80fcf7e99df3 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; } |