diff options
-rw-r--r-- | libavcodec/cllc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/cllc.c b/libavcodec/cllc.c index ec11fc34b0..fe9583796f 100644 --- a/libavcodec/cllc.c +++ b/libavcodec/cllc.c @@ -81,6 +81,10 @@ static int read_code_table(CLLCContext *ctx, GetBitContext *gb, VLC *vlc) count++; } + if (prefix > (65535 - 256)/2) { + vlc->table = NULL; + return AVERROR_INVALIDDATA; + } prefix <<= 1; } |