GraphicsMagick: coders/mat.c Prevent against geometry injection.
GraphicsMagick Commits <[email protected]> Mon, 06 Nov 2023 18:39:29 -0600
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.14765.1699317579.1462.graphicsmagick-commit@lists.sourceforge.net> |
changeset 6a6ef48daf48 in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=6a6ef48daf48 summary: coders/mat.c Prevent against geometry injection. diffstat: ChangeLog | 5 +++++ coders/mat.c | 5 +++++ 2 files changed, 10 insertions(+), 0 deletions(-) diffs (34 lines): diff -r 417128e5beef -r 6a6ef48daf48 ChangeLog --- a/ChangeLog Tue Nov 07 01:26:30 2023 +0100 +++ b/ChangeLog Tue Nov 07 01:39:11 2023 +0100 @@ -1,3 +1,8 @@ +2023-11-07 Bob Friesenhahn <[email protected]> + + * coders/wpg.c Revert + * coders/mat.c Prevent against geometry injection. + 2023-11-06 Bob Friesenhahn <[email protected]> * coders/wpg.c (ExtractPostscript): Restore previous diff -r 417128e5beef -r 6a6ef48daf48 coders/mat.c --- a/coders/mat.c Tue Nov 07 01:26:30 2023 +0100 +++ b/coders/mat.c Tue Nov 07 01:39:11 2023 +0100 @@ -435,6 +435,9 @@ if((clone_info->file=fopen(clone_info->filename,"rb"))==NULL) goto UnlinkFile; if((image2 = AllocateImage(clone_info))==NULL) goto EraseFile; + image2->rows=0; + image2->columns=0; + status = OpenBlob(clone_info,image2,ReadBinaryBlobMode,exception); if (status == False) { @@ -831,6 +834,8 @@ Open image file. */ image = AllocateImage(image_info); + image->rows=0; + image->columns=0; status = OpenBlob(image_info, image, ReadBinaryBlobMode, exception); if (status == False)