webpmux: fix loop_count range check

explicitly check [0, 65535], the use of 'long' was removed in a prior
commit

Change-Id: I70d5bf286908459b5d4d619c657853f0e833b6ea
This commit is contained in:
James Zern 2014-09-11 15:26:11 -07:00
parent 96d43a873a
commit 0e23c487da

View File

@ -939,7 +939,7 @@ static int Process(const WebPMuxConfig* config) {
int parse_error = 0; int parse_error = 0;
const int loop_count = const int loop_count =
ExUtilGetInt(feature->args_[i].params_, 10, &parse_error); ExUtilGetInt(feature->args_[i].params_, 10, &parse_error);
if (loop_count != (int)loop_count) { if (loop_count < 0 || loop_count > 65535) {
// Note: This is only a 'necessary' condition for loop_count // Note: This is only a 'necessary' condition for loop_count
// to be valid. The 'sufficient' conditioned in checked in // to be valid. The 'sufficient' conditioned in checked in
// WebPMuxSetAnimationParams() method called later. // WebPMuxSetAnimationParams() method called later.