Merge "mux: ensure # images = # tiles"

This commit is contained in:
pascal massimino 2012-04-24 04:18:35 -07:00 committed by Gerrit Code Review
commit a87fc3f609

View File

@ -541,6 +541,11 @@ WebPMuxError WebPMuxValidate(const WebPMux* const mux) {
return WEBP_MUX_INVALID_ARGUMENT; return WEBP_MUX_INVALID_ARGUMENT;
} }
// num_tiles & num_images are consistent.
if (num_tiles > 0 && num_images != num_tiles) {
return WEBP_MUX_INVALID_ARGUMENT;
}
return WEBP_MUX_OK; return WEBP_MUX_OK;
} }