Commit e52312ca authored by reimar's avatar reimar

Improve dxa probe by checking the values for width and height are reasonable.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19897 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent bb93e506
......@@ -36,9 +36,15 @@ typedef struct{
static int dxa_probe(AVProbeData *p)
{
int w, h;
if (p->buf_size < 15)
return 0;
w = AV_RB16(p->buf + 11);
h = AV_RB16(p->buf + 13);
/* check file header */
if (p->buf[0] == 'D' && p->buf[1] == 'E' &&
p->buf[2] == 'X' && p->buf[3] == 'A')
p->buf[2] == 'X' && p->buf[3] == 'A' &&
w && w <= 2048 && h && h <= 2048)
return AVPROBE_SCORE_MAX;
else
return 0;
......
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