diff options
Diffstat (limited to 'libavcodec/golomb.h')
-rw-r--r-- | libavcodec/golomb.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h index 1f988d74aa..aed9b22471 100644 --- a/libavcodec/golomb.h +++ b/libavcodec/golomb.h @@ -66,9 +66,12 @@ static inline int get_ue_golomb(GetBitContext *gb) return ff_ue_golomb_vlc_code[buf]; } else { int log = 2 * av_log2(buf) - 31; + + skip_bits_long(gb, 32 - log); + if (log < 7) + return AVERROR_INVALIDDATA; buf >>= log; buf--; - skip_bits_long(gb, 32 - log); return buf; } |