Add another safety-check in the bitmap strips parsing - don't allow the num_subimages parameter to %xl to be <= 0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16779 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
395b785a79
commit
6d9c353f2e
1 changed files with 3 additions and 0 deletions
|
@ -516,6 +516,9 @@ static int parse_image_load(const char *wps_bufptr,
|
|||
pos = strchr(ptr, '|');
|
||||
if (pos && pos < newline)
|
||||
wps_data->img[n].num_subimages = atoi(ptr);
|
||||
|
||||
if (wps_data->img[n].num_subimages <= 0)
|
||||
return WPS_ERROR_INVALID_PARAM;
|
||||
}
|
||||
|
||||
/* Skip the rest of the line */
|
||||
|
|
Loading…
Reference in a new issue