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

Side by Side Diff: patches/ugly/07_get_bits_overrun.patch

Issue 4533003: patched ffmpeg nov 2 (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: '' Created 10 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 diff -rpu -N orig/libavcodec/get_bits.h ffmpeg-mt/libavcodec/get_bits.h 1 diff -wurp -N orig/libavcodec/get_bits.h ffmpeg-mt/libavcodec/get_bits.h
2 --- orig/libavcodec/get_bits.h» 2010-10-11 16:54:49 -0700 2 --- orig/libavcodec/get_bits.h» 2010-11-04 08:07:08 -0700
3 +++ ffmpeg-mt/libavcodec/get_bits.h» 2010-10-11 16:54:53 -0700 3 +++ ffmpeg-mt/libavcodec/get_bits.h» 2010-11-04 08:07:14 -0700
4 @@ -53,13 +53,21 @@ 4 @@ -53,13 +53,21 @@
5 /* buffer, buffer_end and size_in_bits must be present and used by every reader */ 5 /* buffer, buffer_end and size_in_bits must be present and used by every reader */
6 typedef struct GetBitContext { 6 typedef struct GetBitContext {
7 const uint8_t *buffer, *buffer_end; 7 const uint8_t *buffer, *buffer_end;
8 + /* Ugly, but clients of this bit reader do not seem to check for enough 8 + /* Ugly, but clients of this bit reader do not seem to check for enough
9 + * data before calling. So we'll return 0's on overrun rather than crashing 9 + * data before calling. So we'll return 0's on overrun rather than crashing
10 + * with random read faults. 10 + * with random read faults.
11 + */ 11 + */
12 + int buffer_exhausted; 12 + int buffer_exhausted;
13 + int buffer_enforcing; 13 + int buffer_enforcing;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 #endif 91 #endif
92 @@ -482,6 +510,8 @@ static inline void init_get_bits(GetBitC 92 @@ -482,6 +510,8 @@ static inline void init_get_bits(GetBitC
93 s->buffer= buffer; 93 s->buffer= buffer;
94 s->size_in_bits= bit_size; 94 s->size_in_bits= bit_size;
95 s->buffer_end= buffer + buffer_size; 95 s->buffer_end= buffer + buffer_size;
96 + s->buffer_exhausted = 0; 96 + s->buffer_exhausted = 0;
97 + s->buffer_enforcing = 0; 97 + s->buffer_enforcing = 0;
98 #ifdef ALT_BITSTREAM_READER 98 #ifdef ALT_BITSTREAM_READER
99 s->index=0; 99 s->index=0;
100 #elif defined LIBMPEG2_BITSTREAM_READER 100 #elif defined LIBMPEG2_BITSTREAM_READER
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698