VP8GetInfo(): Check for zero width or height.

Change-Id: I0bf40621ed0776e1a185ad8abab5a914a3d29d69
This commit is contained in:
Urvang Joshi 2013-04-25 12:08:40 -07:00
parent 9bf312938f
commit 00046171a5

View File

@ -121,6 +121,9 @@ int VP8GetInfo(const uint8_t* data, size_t data_size, size_t chunk_size,
if (((bits >> 5)) >= chunk_size) { // partition_length if (((bits >> 5)) >= chunk_size) { // partition_length
return 0; // inconsistent size information. return 0; // inconsistent size information.
} }
if (w == 0 || h == 0) {
return 0; // We don't support both width and height to be zero.
}
if (width) { if (width) {
*width = w; *width = w;