Commit ddfe1246 authored by Anton Khirnov's avatar Anton Khirnov
Browse files

flicvideo: avoid an infinite loop in byte run compression

When byte_run is 0, pixel_countdown is not touched and the loop will run
parent 067432c1
......@@ -348,6 +348,11 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
pixel_countdown = s->avctx->width;
while (pixel_countdown > 0) {
byte_run = sign_extend(bytestream2_get_byte(&g2), 8);
if (!byte_run) {
av_log(avctx, AV_LOG_ERROR, "Invalid byte run value.\n");
if (byte_run > 0) {
palette_idx1 = bytestream2_get_byte(&g2);
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