diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-14 16:23:39 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-19 17:59:22 +0100 |
commit | 6f3bc92c294b4ce903047e1fd43d71e59c86337b (patch) | |
tree | 6040a4afae9abb56c863753b3aed0830e2fe3b2e /libavcodec | |
parent | bd531038e8affa6387d2d7dadd20d907e5791ab5 (diff) | |
download | ffmpeg-6f3bc92c294b4ce903047e1fd43d71e59c86337b.tar.gz |
init_get_bits8: zero pointers & struct on error
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 153fad14e5a2f85637aa6c254ced0fc1c68974e2)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/get_bits.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h index 1946c78af2..964456ee5d 100644 --- a/libavcodec/get_bits.h +++ b/libavcodec/get_bits.h @@ -407,7 +407,7 @@ static inline int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size) { if (byte_size > INT_MAX / 8 || byte_size < 0) - return AVERROR_INVALIDDATA; + byte_size = -1; return init_get_bits(s, buffer, byte_size * 8); } |