aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-10-22 16:08:40 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-10-27 11:51:01 +0100
commit8b1bb4f38e0c0c083f1833ac9411fb1fa9d4764c (patch)
tree31ad65f839b0ab5e6316cec490fb064b179b6823 /libavcodec
parent548f1a3fa479836d60d85d02708db79c6345acea (diff)
downloadffmpeg-8b1bb4f38e0c0c083f1833ac9411fb1fa9d4764c.tar.gz
avcodec/webp: Replace never-true check by assert
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/webp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/webp.c b/libavcodec/webp.c
index 549d125dcc..6de6a5c036 100644
--- a/libavcodec/webp.c
+++ b/libavcodec/webp.c
@@ -329,8 +329,7 @@ static int read_huffman_code_normal(WebPContext *s, HuffReader *hc,
int i, symbol, max_symbol, prev_code_len, ret;
int num_codes = 4 + get_bits(&s->gb, 4);
- if (num_codes > NUM_CODE_LENGTH_CODES)
- return AVERROR_INVALIDDATA;
+ av_assert1(num_codes <= NUM_CODE_LENGTH_CODES);
for (i = 0; i < num_codes; i++)
code_length_code_lengths[code_length_code_order[i]] = get_bits(&s->gb, 3);