Revision 435535e4

View differences:

libavformat/jvdec.c
116 116
        jvf->audio_size = avio_rl32(pb);
117 117
        jvf->video_size = avio_rl32(pb);
118 118
        jvf->palette_size = avio_r8(pb) ? 768 : 0;
119
        jvf->video_size = FFMIN(FFMAX(jvf->video_size, 0),
120
                                INT_MAX - JV_PREAMBLE_SIZE - jvf->palette_size);
119 121
        if (avio_r8(pb))
120 122
             av_log(s, AV_LOG_WARNING, "unsupported audio codec\n");
121 123
        jvf->video_type = avio_r8(pb);

Also available in: Unified diff