Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: chromium/patches/ugly/09_enforce_vorbis_oob_divzero.patch

Issue 9290059: Initial commit of all previous Chrome build scripts. (Closed) Base URL: http://git.chromium.org/chromium/third_party/ffmpeg.git@master
Patch Set: Drop deprecated subfolder. Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 diff -wurp -N orig/libavcodec/vorbisdec.c ffmpeg/libavcodec/vorbisdec.c
2 --- orig/libavcodec/vorbisdec.c 2011-07-12 20:48:01.742931929 -0700
3 +++ ffmpeg/libavcodec/vorbisdec.c 2011-07-12 20:48:01.813025789 -0700
4 @@ -991,6 +991,7 @@ static av_cold int vorbis_decode_init(AV
5 }
6
7 init_get_bits(gb, header_start[0], header_len[0]*8);
8 + gb->buffer_enforcing=1;
9 hdr_type = get_bits(gb, 8);
10 if (hdr_type != 1) {
11 av_log(avccontext, AV_LOG_ERROR, "First header is not the id header.\n" );
12 @@ -1003,6 +1004,7 @@ static av_cold int vorbis_decode_init(AV
13 }
14
15 init_get_bits(gb, header_start[2], header_len[2]*8);
16 + gb->buffer_enforcing=1;
17 hdr_type = get_bits(gb, 8);
18 if (hdr_type != 5) {
19 av_log(avccontext, AV_LOG_ERROR, "Third header is not the setup header. \n");
20 @@ -1293,7 +1295,7 @@ static av_always_inline int vorbis_resid
21 uint16_t voffset, partition_count, j_times_ptns_to_read;
22
23 voffset = vr->begin;
24 - for (partition_count = 0; partition_count < ptns_to_read;) { // SPEC error
25 + for(partition_count=0;partition_count<ptns_to_read && !(gb->buffer_exha usted && gb->index > gb->size_in_bits);) { // SPEC error
26 if (!pass) {
27 unsigned inverse_class = ff_inverse[vr->classifications];
28 for (j_times_ptns_to_read = 0, j = 0; j < ch_used; ++j) {
29 @@ -1613,6 +1615,7 @@ static int vorbis_decode_frame(AVCodecCo
30 av_dlog(NULL, "packet length %d \n", buf_size);
31
32 init_get_bits(gb, buf, buf_size*8);
33 + gb->buffer_enforcing=1;
34
35 len = vorbis_parse_audio_packet(vc);
36
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698