diff options
Diffstat (limited to 'apps/gui/wps_parser.c')
-rw-r--r-- | apps/gui/wps_parser.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c index 9327e89859..940b3e45ed 100644 --- a/apps/gui/wps_parser.c +++ b/apps/gui/wps_parser.c | |||
@@ -516,6 +516,9 @@ static int parse_image_load(const char *wps_bufptr, | |||
516 | pos = strchr(ptr, '|'); | 516 | pos = strchr(ptr, '|'); |
517 | if (pos && pos < newline) | 517 | if (pos && pos < newline) |
518 | wps_data->img[n].num_subimages = atoi(ptr); | 518 | wps_data->img[n].num_subimages = atoi(ptr); |
519 | |||
520 | if (wps_data->img[n].num_subimages <= 0) | ||
521 | return WPS_ERROR_INVALID_PARAM; | ||
519 | } | 522 | } |
520 | 523 | ||
521 | /* Skip the rest of the line */ | 524 | /* Skip the rest of the line */ |