Skip to content
Snippets Groups Projects
Commit 295218f5 authored by Paul B Mahol's avatar Paul B Mahol
Browse files

idcin: check chunk_size value before using it


Fixes integer overflow. Fixes CID732223.

Signed-off-by: default avatarPaul B Mahol <onemda@gmail.com>
parent 3f814891
No related branches found
No related tags found
No related merge requests found
......@@ -256,6 +256,8 @@ static int idcin_read_packet(AVFormatContext *s,
chunk_size = avio_rl32(pb);
/* skip the number of decoded bytes (always equal to width * height) */
avio_skip(pb, 4);
if (chunk_size < 4)
return AVERROR_INVALIDDATA;
chunk_size -= 4;
ret= av_get_packet(pb, pkt, chunk_size);
if (ret < 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment