libavformat/ac3dec.c:71: error: Integer Overflow L1
  ([1099511627520, +oo] + `*p->buf`):unsigned32.

libavformat/ac3dec.c:64:9: <LHS trace>
62.     if (max_frames) {
63.         int pes = 0, i;
64.         unsigned int code = -1;
            ^
65. 
66. #define VIDEO_ID 0x000001e0

libavformat/ac3dec.c:64:9: Assignment
62.     if (max_frames) {
63.         int pes = 0, i;
64.         unsigned int code = -1;
            ^
65. 
66. #define VIDEO_ID 0x000001e0

libavformat/ac3dec.c:27:1: <RHS trace>
25. #include "rawdec.h"
26. 
27. static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id)
    ^
28. {
29.     int max_frames, first_frames = 0, frames;

libavformat/ac3dec.c:27:1: Parameter `*p->buf`
25. #include "rawdec.h"
26. 
27. static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id)
    ^
28. {
29.     int max_frames, first_frames = 0, frames;

libavformat/ac3dec.c:71:13: Binary operation: ([1099511627520, +oo] + *p->buf):unsigned32
69.          * towards mpegps if we detect this stream as both. */
70.         for (i = 0; i<p->buf_size; i++) {
71.             code = (code << 8) + p->buf[i];
                ^
72.             if ((code & 0xffffff00) == 0x100) {
73.                 if     ((code & 0x1f0) == VIDEO_ID) pes++;

static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id)
{
    int max_frames, first_frames = 0, frames;
    uint8_t *buf, *buf2, *end;
    AC3HeaderInfo hdr;
    GetBitContext gbc;
    enum CodecID codec_id = CODEC_ID_AC3;
    max_frames = 0;
    buf = p->buf;
    end = buf + p->buf_size;
    for(; buf < end; buf++) {
        buf2 = buf;
        for(frames = 0; buf2 < end; frames++) {
            init_get_bits(&gbc, buf2, 54);
            if(avpriv_ac3_parse_header(&gbc, &hdr) < 0)
                break;
            if(buf2 + hdr.frame_size > end ||
               av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0, buf2 + 2, hdr.frame_size - 2))
                break;
            if (hdr.bitstream_id > 10)
                codec_id = CODEC_ID_EAC3;
            buf2 += hdr.frame_size;
        }
        max_frames = FFMAX(max_frames, frames);
        if(buf == p->buf)
            first_frames = frames;
    }
    if(codec_id != expected_codec_id) return 0;
    if (first_frames >= 4) return AVPROBE_SCORE_MAX / 2 + 1;
    if (max_frames) {
        int pes = 0, i;
        unsigned int code = -1;
#define VIDEO_ID 0x000001e0
#define AUDIO_ID 0x000001c0
        for (i = 0; i<p->buf_size; i++) {
            code = (code << 8) + p->buf[i];
            if ((code & 0xffffff00) == 0x100) {
                if     ((code & 0x1f0) == VIDEO_ID) pes++;
                else if((code & 0x1e0) == AUDIO_ID) pes++;
            }
        }
        if (pes)
            max_frames = (max_frames + pes - 1) / pes;
    }
    if      (max_frames >  500) return AVPROBE_SCORE_MAX / 2;
    else if (max_frames >= 4)   return AVPROBE_SCORE_MAX / 4;
    else if (max_frames >= 1)   return 1;
    else                        return 0;
}
['static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id)\n{\n    int max_frames, first_frames = 0, frames;\n    uint8_t *buf, *buf2, *end;\n    AC3HeaderInfo hdr;\n    GetBitContext gbc;\n    enum CodecID codec_id = CODEC_ID_AC3;\n    max_frames = 0;\n    buf = p->buf;\n    end = buf + p->buf_size;\n    for(; buf < end; buf++) {\n        buf2 = buf;\n        for(frames = 0; buf2 < end; frames++) {\n            init_get_bits(&gbc, buf2, 54);\n            if(avpriv_ac3_parse_header(&gbc, &hdr) < 0)\n                break;\n            if(buf2 + hdr.frame_size > end ||\n               av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0, buf2 + 2, hdr.frame_size - 2))\n                break;\n            if (hdr.bitstream_id > 10)\n                codec_id = CODEC_ID_EAC3;\n            buf2 += hdr.frame_size;\n        }\n        max_frames = FFMAX(max_frames, frames);\n        if(buf == p->buf)\n            first_frames = frames;\n    }\n    if(codec_id != expected_codec_id) return 0;\n    if (first_frames >= 4) return AVPROBE_SCORE_MAX / 2 + 1;\n    if (max_frames) {\n        int pes = 0, i;\n        unsigned int code = -1;\n#define VIDEO_ID 0x000001e0\n#define AUDIO_ID 0x000001c0\n        for (i = 0; i<p->buf_size; i++) {\n            code = (code << 8) + p->buf[i];\n            if ((code & 0xffffff00) == 0x100) {\n                if     ((code & 0x1f0) == VIDEO_ID) pes++;\n                else if((code & 0x1e0) == AUDIO_ID) pes++;\n            }\n        }\n        if (pes)\n            max_frames = (max_frames + pes - 1) / pes;\n    }\n    if      (max_frames >  500) return AVPROBE_SCORE_MAX / 2;\n    else if (max_frames >= 4)   return AVPROBE_SCORE_MAX / 4;\n    else if (max_frames >= 1)   return 1;\n    else                        return 0;\n}']