GraphicsMagick: MogrifyImage(): Assure that -set has arguments
GraphicsMagick Commits <[email protected]>
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.3301.1685824157.1565.graphicsmagick-commit@lists.sourceforge.net> |
changeset 3cedf794348b in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=3cedf794348b summary: MogrifyImage(): Assure that -set has arguments diffstat: ChangeLog | 4 ++++ magick/command.c | 10 ++++++++++ www/Changelog.html | 3 +++ 3 files changed, 17 insertions(+), 0 deletions(-) diffs (50 lines): diff -r bb068ff50d5c -r 3cedf794348b ChangeLog --- a/ChangeLog Sat Jun 03 14:04:58 2023 -0500 +++ b/ChangeLog Sat Jun 03 15:29:02 2023 -0500 @@ -1,5 +1,9 @@ 2023-06-03 Bob Friesenhahn <[email protected]> + * magick/command.c (MogrifyImage): Assure that -set has arguments. + Addresses SourceForge issue #701 "Segmentation Violation in gm + (magick/attribute.c:324 in SetImageAttribute)". + * magick/analyze.c (AllocateDepthMap): Use resource-limited memory allocator. diff -r bb068ff50d5c -r 3cedf794348b magick/command.c --- a/magick/command.c Sat Jun 03 14:04:58 2023 -0500 +++ b/magick/command.c Sat Jun 03 15:29:02 2023 -0500 @@ -11014,10 +11014,20 @@ *key, *value; + if (i+1 > argc) + { + ThrowException(&(*image)->exception,OptionError,MissingArgument,option+1); + break; + } key=argv[++i]; (void) SetImageAttribute(*image,key,(char *) NULL); if (*option == '-') { + if (i+1 > argc) + { + ThrowException(&(*image)->exception,OptionError,MissingArgument,option+1); + break; + } value=argv[++i]; (void) SetImageAttribute(*image,key,value); } diff -r bb068ff50d5c -r 3cedf794348b www/Changelog.html --- a/www/Changelog.html Sat Jun 03 14:04:58 2023 -0500 +++ b/www/Changelog.html Sat Jun 03 15:29:02 2023 -0500 @@ -40,6 +40,9 @@ <p>2023-06-03 Bob Friesenhahn <<a class="reference external" href="mailto:bfriesen%40simple.dallas.tx.us">bfriesen<span>@</span>simple<span>.</span>dallas<span>.</span>tx<span>.</span>us</a>></p> <blockquote> <ul class="simple"> +<li><p>magick/command.c (MogrifyImage): Assure that -set has arguments. +Addresses SourceForge issue #701 "Segmentation Violation in gm +(magick/attribute.c:324 in SetImageAttribute)".</p></li> <li><p>magick/analyze.c (AllocateDepthMap): Use resource-limited memory allocator.</p></li> <li><p>magick/operator.c (QuantumDepthCB): Janitorial cleanups.</p></li>