Mercurial > libavcodec.hg
diff indeo3.c @ 2422:18b8b2dcc037 libavcodec
various security fixes and precautionary checks
author | michael |
---|---|
date | Wed, 12 Jan 2005 00:16:25 +0000 |
parents | 3d4a1f8e6a27 |
children | f67b63ed036d |
line wrap: on
line diff
--- a/indeo3.c Tue Jan 11 08:16:04 2005 +0000 +++ b/indeo3.c Wed Jan 12 00:16:25 2005 +0000 @@ -196,6 +196,10 @@ hdr_height = le2me_16(*(uint16_t *)buf_pos); buf_pos += 2; hdr_width = le2me_16(*(uint16_t *)buf_pos); + + if(avcodec_check_dimensions(NULL, hdr_width, hdr_height)) + return -1; + buf_pos += 2; chroma_height = ((hdr_height >> 2) + 3) & 0x7ffc; chroma_width = ((hdr_width >> 2) + 3) & 0x7ffc;