aboutsummaryrefslogtreecommitdiff
path: root/libavcodec/put_bits.h
diff options
context:
space:
mode:
authorMichael Niedermayer2011-10-09 04:02:03 +0200
committerMichael Niedermayer2011-10-09 04:02:03 +0200
commitc5db8b4d09762f5228eaf3c3a0017657ed27d866 (patch)
tree59719cfc31a9e112b3f7099392506a6e1e54449f /libavcodec/put_bits.h
parent7fb92be7e50ea4ba5712804326c6814ae02dd190 (diff)
parenta31e9f68a426f634e002282885c6c2eb1bfbea44 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: lavf: fix signed overflow in avformat_find_stream_info() vp8: fix signed overflows motion_est: fix some signed overflows dca: fix signed overflow in shift aacdec: fix undefined shifts bink: Check for various out of bound writes bink: Check for out of bound writes when building tree put_bits: fix invalid shift by 32 in flush_put_bits() Conflicts: libavcodec/bink.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/put_bits.h')
-rw-r--r--libavcodec/put_bits.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h
index a3fc5f16f1..7384fba4e4 100644
--- a/libavcodec/put_bits.h
+++ b/libavcodec/put_bits.h
@@ -78,7 +78,8 @@ static inline int put_bits_count(PutBitContext *s)
static inline void flush_put_bits(PutBitContext *s)
{
#ifndef BITSTREAM_WRITER_LE
- s->bit_buf<<= s->bit_left;
+ if (s->bit_left < 32)
+ s->bit_buf<<= s->bit_left;
#endif
while (s->bit_left < 32) {
/* XXX: should test end of buffer */