- Integer 'rowStride' could be obtained from untrusted source at loader-bmp.cpp:105
- Checked 'infoHeader.width' and 'infoHeader.height' bounds
Change-Id: I5e054565e85b11dc8cdb5a2809955fd75a3c53fb
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
width = infoHeader.width;
height = abs(infoHeader.height);
+ if( infoHeader.width == 0 )
+ {
+ return false;
+ }
+
return true;
}
}
case BMP_RGB4:
{
- decodeResult = DecodeRGB4(fp, pixels, infoHeader.width, infoHeader.height, 14 + infoHeader.infoHeaderSize, topDown);
+ decodeResult = DecodeRGB4(fp, pixels, infoHeader.width, abs(infoHeader.height), 14 + infoHeader.infoHeaderSize, topDown);
break;
}
case BMP_RLE4: