Revision 4a72765a libavcodec/dvbsubdec.c

View differences:

libavcodec/dvbsubdec.c
1423 1423

  
1424 1424
#endif
1425 1425

  
1426
    if (buf_size <= 2)
1426
    if (buf_size <= 2 || *buf != 0x0f)
1427 1427
        return -1;
1428 1428

  
1429 1429
    p = buf;
......
1467 1467
        p += segment_length;
1468 1468
    }
1469 1469

  
1470
    if (p != p_end) {
1471
        av_dlog(avctx, "Junk at end of packet\n");
1472
        return -1;
1473
    }
1474

  
1475
    return buf_size;
1470
    return p - buf;
1476 1471
}
1477 1472

  
1478 1473

  

Also available in: Unified diff