diff options
-rw-r--r-- | apps/gui/wps_parser.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c index c0a1202eb8..e72079ce71 100644 --- a/apps/gui/wps_parser.c +++ b/apps/gui/wps_parser.c | |||
@@ -357,6 +357,14 @@ static int parse_image_display(const char *wps_bufptr, | |||
357 | struct wps_data *wps_data) | 357 | struct wps_data *wps_data) |
358 | { | 358 | { |
359 | int n = get_image_id(*wps_bufptr); | 359 | int n = get_image_id(*wps_bufptr); |
360 | |||
361 | if (n == -1) | ||
362 | { | ||
363 | /* invalid picture display tag */ | ||
364 | token->type = WPS_TOKEN_UNKNOWN; | ||
365 | return 0; | ||
366 | } | ||
367 | |||
360 | token->value.i = n; | 368 | token->value.i = n; |
361 | 369 | ||
362 | /* if the image is in a conditional, remember it */ | 370 | /* if the image is in a conditional, remember it */ |