From 021bf5c23732150f6fd00def4a1e6421aebecd4c Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Fri, 21 Oct 2016 17:44:19 +0000 Subject: [PATCH] #1247 Thank You Hanno for reporting this and providing a patch. --- src/image.cpp | 1 + 1 file changed, 1 insertion(+) 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); }