Project

General

Profile

Bug #1247 » exiv2-fix-oob-setIccProfile.diff

patch to fix out of bounds - Hanno Böck, 21 Oct 2016 11:40

View differences:

src/image.cpp (working copy)
614 614
    void Image::setIccProfile(Exiv2::DataBuf& iccProfile,bool bTestValid)
615 615
    {
616 616
        if ( bTestValid ) {
617
            if ( iccProfile.pData_ && ( iccProfile.size_ < sizeof(long)) ) throw Error(53);
617 618
            long size = iccProfile.pData_ ? getULong(iccProfile.pData_, bigEndian): -1;
618 619
            if ( size!= iccProfile.size_ ) throw Error(53);
619 620
        }
(2-2/2)