Browse Source

get_xbits: assert validity of the number of bits

similar is already done in the other get_bits() functions

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.0
Michael Niedermayer 12 years ago
parent
commit
ff130d7363
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      libavcodec/get_bits.h

+ 1
- 0
libavcodec/get_bits.h View File

@@ -214,6 +214,7 @@ static inline int get_xbits(GetBitContext *s, int n)
register int sign;
register int32_t cache;
OPEN_READER(re, s);
av_assert2(n>0 && n<=25);
UPDATE_CACHE(re, s);
cache = GET_CACHE(re, s);
sign = ~cache >> 31;


Loading…
Cancel
Save