Skip to content

Commit

Permalink
Added missing check to prevent a possible segfault.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Feb 18, 2023
1 parent 9cf9fe2 commit 1c44066
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wand/mogrify.c
Original file line number Diff line number Diff line change
Expand Up @@ -8711,7 +8711,7 @@ WandExport MagickBooleanType MogrifyImageList(ImageInfo *image_info,

(void) SyncImagesSettings(mogrify_info,*images);
arguments=StringToArgv(argv[i+1],&number_arguments);
if (arguments == (char **) NULL)
if ((arguments == (char **) NULL) || (number_arguments == 1))
break;
if ((argc > 1) && (strchr(arguments[1],'=') != (char *) NULL))
{
Expand Down

0 comments on commit 1c44066

Please sign in to comment.