diff --git a/src/image.cpp b/src/image.cpp index b1f881bf..94228280 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -614,6 +614,7 @@ namespace Exiv2 { void Image::setIccProfile(Exiv2::DataBuf& iccProfile,bool bTestValid) { if ( bTestValid ) { + if ( iccProfile.pData_ && ( iccProfile.size_ < sizeof(long)) ) throw Error(53); long size = iccProfile.pData_ ? getULong(iccProfile.pData_, bigEndian): -1; if ( size!= iccProfile.size_ ) throw Error(53); }