diff options
| -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 9327e89..940b3e4 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, 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 */ |