GraphicsMagick: coders/wpg.c: Do not approve any format from "ME...
GraphicsMagick Commits <[email protected]>
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.9524.1675201802.1384.graphicsmagick-commit@lists.sourceforge.net> |
changeset 3da5e3fca8f8 in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=3da5e3fca8f8 summary: coders/wpg.c: Do not approve any format from "META" module for embedding. diffstat: ChangeLog | 5 +++++ coders/wpg.c | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletions(-) diffs (35 lines): diff -r 8dff186bd8ba -r 3da5e3fca8f8 ChangeLog --- a/ChangeLog Sat Jan 28 11:09:03 2023 -0600 +++ b/ChangeLog Tue Jan 31 22:49:32 2023 +0100 @@ -1,3 +1,8 @@ +2023-01-31 Fojtik Jaroslav <[email protected]> + + * coders/wpg.c: Do not approve any format from "META" module + for embedding. + 2023-01-28 Bob Friesenhahn <[email protected]> * coders/wpg.c (WriteWPGImage): image->colors is only valid for diff -r 8dff186bd8ba -r 3da5e3fca8f8 coders/wpg.c --- a/coders/wpg.c Sat Jan 28 11:09:03 2023 -0600 +++ b/coders/wpg.c Tue Jan 31 22:49:32 2023 +0100 @@ -192,8 +192,18 @@ static int ApproveFormatForWPG(const char *Format) { + ExceptionInfo exception; + const MagickInfo *magick_info; + if(!strcmp(Format,"PFB")) return 0; - if(!strcmp(Format,"8BIMTEXT")) return 0; + + /*if(!strcmp(Format,"8BIMTEXT")) return 0; This test is no longer needed, META module includes this case. */ + magick_info = GetMagickInfo(Format,&exception); + if(magick_info != (const MagickInfo *)NULL) + { + if(strcmp(magick_info->module, "META") == 0) return 0; + } + return 1; }