mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
avcodec/cbs_h2645: Skip all 0 NAL units
Fixes: assertion failure Fixes: 19286/clusterfuzz-testcase-minimized-ffmpeg_BSF_H264_REDUNDANT_PPS_fuzzer-5707990724509696 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
794352ae9d
commit
285138ef14
@ -568,7 +568,10 @@ static int cbs_h2645_fragment_add_nals(CodedBitstreamContext *ctx,
|
|||||||
// Remove trailing zeroes.
|
// Remove trailing zeroes.
|
||||||
while (size > 0 && nal->data[size - 1] == 0)
|
while (size > 0 && nal->data[size - 1] == 0)
|
||||||
--size;
|
--size;
|
||||||
av_assert0(size > 0);
|
if (size == 0) {
|
||||||
|
av_log(ctx->log_ctx, AV_LOG_VERBOSE, "Discarding empty 0 NAL unit\n");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
ref = (nal->data == nal->raw_data) ? frag->data_ref
|
ref = (nal->data == nal->raw_data) ? frag->data_ref
|
||||||
: packet->rbsp.rbsp_buffer_ref;
|
: packet->rbsp.rbsp_buffer_ref;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user