Commit 63c9b30f authored by Andreas Cadhalpun's avatar Andreas Cadhalpun

qtpalette: make the color_* variables unsigned again

This fixes segmentation faults due to out of bounds writes, when
color_start is interpreted as negative number.

This regression was introduced in commit 57631f.
Reviewed-by: 's avatarMats Peterson <matsp888@yahoo.com>
Signed-off-by: 's avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
parent 59c915a4
......@@ -48,7 +48,7 @@ int ff_get_qtpalette(int codec_id, AVIOContext *pb, uint32_t *palette)
/* If the depth is 1, 2, 4, or 8 bpp, file is palettized. */
if ((bit_depth == 1 || bit_depth == 2 || bit_depth == 4 || bit_depth == 8)) {
int color_count, color_start, color_end;
uint32_t color_count, color_start, color_end;
uint32_t a, r, g, b;
/* Ignore the greyscale bit for 1-bit video and sample
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment