|
|
@ -614,6 +614,7 @@ namespace Exiv2 {
|
|
|
|
void Image::setIccProfile(Exiv2::DataBuf& iccProfile,bool bTestValid)
|
|
|
|
void Image::setIccProfile(Exiv2::DataBuf& iccProfile,bool bTestValid)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if ( bTestValid ) {
|
|
|
|
if ( bTestValid ) {
|
|
|
|
|
|
|
|
if ( iccProfile.pData_ && ( iccProfile.size_ < sizeof(long)) ) throw Error(53);
|
|
|
|
long size = iccProfile.pData_ ? getULong(iccProfile.pData_, bigEndian): -1;
|
|
|
|
long size = iccProfile.pData_ ? getULong(iccProfile.pData_, bigEndian): -1;
|
|
|
|
if ( size!= iccProfile.size_ ) throw Error(53);
|
|
|
|
if ( size!= iccProfile.size_ ) throw Error(53);
|
|
|
|
}
|
|
|
|
}
|
|
|
|