History

avcodec/cbs_h2645: Skip all 0 NAL units

Fixes: assertion failure Fixes: 19286/clusterfuzz-testcase-minimized-ffmpeg_BSF_H264_REDUNDANT_PPS_fuzzer-5707990724509696

Michael Niedermayer committed 6 years ago

Commit 285138e1 parent 794352a1 file · +4 −1Browse files

Unified · Split

libavcodec/cbs_h2645.c+4−1
@@ -568,7 +568,10 @@ static int cbs_h2645_fragment_add_nals(CodedBitstreamContext *ctx, · 567 unmodified lines
568568 // Remove trailing zeroes.
569569 while (size > 0 && nal->data[size - 1] == 0)
570570 --size;
571− av_assert0(size > 0);
571+ if (size == 0) {
572+ av_log(ctx->log_ctx, AV_LOG_VERBOSE, "Discarding empty 0 NAL unit\n");
573+ continue;
574+ }
572575
573576 ref = (nal->data == nal->raw_data) ? frag->data_ref
574577 : packet->rbsp.rbsp_buffer_ref;

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