Revision 3214db98 libavformat/dxa.c

View differences:

libavformat/dxa.c
36 36

  
37 37
static int dxa_probe(AVProbeData *p)
38 38
{
39
    int w, h;
40
    if (p->buf_size < 15)
41
        return 0;
42
    w = AV_RB16(p->buf + 11);
43
    h = AV_RB16(p->buf + 13);
39 44
    /* check file header */
40 45
    if (p->buf[0] == 'D' && p->buf[1] == 'E' &&
41
        p->buf[2] == 'X' && p->buf[3] == 'A')
46
        p->buf[2] == 'X' && p->buf[3] == 'A' &&
47
        w && w <= 2048 && h && h <= 2048)
42 48
        return AVPROBE_SCORE_MAX;
43 49
    else
44 50
        return 0;

Also available in: Unified diff