History

avcodec/cbs_h2645: Fix showing bits at the end in cbs_read_ue_golomb()

Fixes: Assertion n>0 && n<=25 failed at libavcodec/get_bits.h:375 Fixes: 62617/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5156555663998976

Michael Niedermayer committed 3 years ago

Commit 75eb6981 parent fff875a1 file · +1 −1Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/cbs_h2645.c+1−1
@@ -44,7 +44,7 @@ static int cbs_read_ue_golomb(CodedBitstreamContext *ctx, GetBitContext *gbc, · 43 unmodified lines
44 44
45 max_length = FFMIN(get_bits_left(gbc), 32);45 max_length = FFMIN(get_bits_left(gbc), 32);
46 46
47 leading_bits = show_bits_long(gbc, max_length);47 leading_bits = max_length ? show_bits_long(gbc, max_length) : 0;
48 if (leading_bits == 0) {48 if (leading_bits == 0) {
49 if (max_length >= 32) {49 if (max_length >= 32) {
50 av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid ue-golomb code at "50 av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid ue-golomb code at "

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t