Skip to content
Snippets Groups Projects
Commit db93fd74 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avcodec/golomb: Assert that the input is not too large in set_ue_golomb()

parent 6e09e126
No related branches found
No related tags found
No related merge requests found
...@@ -463,6 +463,7 @@ static inline int get_te(GetBitContext *s, int r, char *file, const char *func, ...@@ -463,6 +463,7 @@ static inline int get_te(GetBitContext *s, int r, char *file, const char *func,
static inline void set_ue_golomb(PutBitContext *pb, int i) static inline void set_ue_golomb(PutBitContext *pb, int i)
{ {
av_assert2(i >= 0); av_assert2(i >= 0);
av_assert2(i <= 0xFFFE);
if (i < 256) if (i < 256)
put_bits(pb, ff_ue_golomb_len[i], i + 1); put_bits(pb, ff_ue_golomb_len[i], i + 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment