GraphicsMagick: coders/tga.c Fixed issue related to oss-fuzz-52084.
GraphicsMagick Commits <[email protected]>
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.11710.1664820124.1826.graphicsmagick-commit@lists.sourceforge.net> |
changeset 7147bc58f042 in /hg/GraphicsMagick
details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=7147bc58f042
summary: coders/tga.c Fixed issue related to oss-fuzz-52084.
diffstat:
coders/tga.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r 33acd8182934 -r 7147bc58f042 coders/tga.c
--- a/coders/tga.c Mon Oct 03 00:22:15 2022 +0200
+++ b/coders/tga.c Mon Oct 03 20:01:37 2022 +0200
@@ -440,7 +440,8 @@
image->colors=tga_info.colormap_length;
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
"Using existing colormap with %u colors.",image->colors);
-
+ if(tga_info.bits_per_pixel==1 && image->colors<=1)
+ ThrowReaderException(CoderError,ColorTypeNotSupported,image);
}
else
{