History

avcodec/cbs_h265_syntax_template:

Fixes: Assertion width > 0 && width <= 32 failed Fixes: 71012/clusterfuzz-testcase-minimized-ffmpeg_BSF_HEVC_METADATA_fuzzer-6073354744823808

Michael Niedermayer committed 2 years ago

Commit 04387591 parent 8657eb91 file · +12 −0Browse files

Unified · Split

libavcodec/cbs_h265_syntax_template.c+12−0
@@ -2307,6 +2307,12 @@ SEI_FUNC(sei_3d_reference_displays_info, (CodedBitstreamContext *ctx, RWContext · 2306 unmodified lines
23072307 else
23082308 length = FFMAX(0, (int)current->exponent_ref_display_width[i] +
23092309 (int)current->prec_ref_display_width - 31);
2310+
2311+ if (length > 32) {
2312+ av_log(ctx->log_ctx, AV_LOG_ERROR, "refDispWidthBits > 32 is not supported\n");
2313+ return AVERROR_PATCHWELCOME;
2314+ }
2315+
23102316 if (length)
23112317 ubs(length, mantissa_ref_display_width[i], 1, i);
23122318 else
@@ -2318,6 +2324,12 @@ SEI_FUNC(sei_3d_reference_displays_info, (CodedBitstreamContext *ctx, RWContext · 5 unmodified lines
23182324 else
23192325 length = FFMAX(0, (int)current->exponent_ref_viewing_distance[i] +
23202326 (int)current->prec_ref_viewing_dist - 31);
2327+
2328+ if (length > 32) {
2329+ av_log(ctx->log_ctx, AV_LOG_ERROR, "refViewDistBits > 32 is not supported\n");
2330+ return AVERROR_PATCHWELCOME;
2331+ }
2332+
23212333 if (length)
23222334 ubs(length, mantissa_ref_viewing_distance[i], 1, i);
23232335 else

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