Skip to content

Commit

Permalink
fix undefined-shift in ReadTGAImage @ https://oss-fuzz.com/testcase?k…
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Oct 12, 2022
1 parent 20875a2 commit b79a3d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coders/tga.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ static Image *ReadTGAImage(const ImageInfo *image_info,ExceptionInfo *exception)
if ((x & 0x07) == 0)
index=(IndexPacket) ReadBlobByte(image);
else
index=(Quantum) ((ssize_t) index << 1);
index=(Quantum) ((size_t) index << 1);
if (tga_info.colormap_type != 0)
pixel=image->colormap[(ssize_t) ConstrainColormapIndex(image,
((unsigned char) index) & 0x80 ? 1 : 0)];
Expand Down

0 comments on commit b79a3d6

Please sign in to comment.