From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 99BD44B6C0 for ; Sat, 24 Jan 2026 13:45:13 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'uo9dTQKjmUmRKNpmh3j9wd3OgHl6AL9EShhI6PippOw=', expected b'CsoTJj1UXHMppwM9GIZ6T9fvLtUx+GYqRA9szfAic20=')) header.d=ffmpeg.org header.i=@ffmpeg.org header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1769262295; h=mime-version : to : date : message-id : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=uo9dTQKjmUmRKNpmh3j9wd3OgHl6AL9EShhI6PippOw=; b=bq/MBrccM3+rNoeKgjBX5grv4kyUVa6N/z6LnzCB3FoCPIycHP5A+/AypDTz4AVBeH/ZA qN48H7ew+k2jl1p98F/lymOQipuWf6dICfkzoPWQRQ9BzmkEwl5BqDDjMZRl9ml6YKaY+wE 35ul02rDzqurKvdt3nabzX6WLiqrpfQ5qCreSnOLKiRfKiL888wHUtEWSH1QcOcOqc9C20y 3QpaOlqGvl3ysWzQpiIS4h2S2KJr3jVxkegU0Dvlpo5fdCpB4W7K9uJI2c6wliF6PjRoccx gW59hprO0Xt4rjJ78MIIp8Hb3kVwpFkgyF96kYAlyExobwOPUTB7TS1tSLxg== Received: from [172.20.0.4] (unknown [172.20.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 91CC3690EDA; Sat, 24 Jan 2026 15:44:55 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1769262278; b=IvhdMvo8Z33aMW7XK46LNhjdJrgdqRbGV+1tuzGxITT+ho1QVddhsGVSaxJPtFEdIkXa1 gluo17u02Fn5wpDScUlqWjoeYXhSD1kae6m/VL2RLnFt1XWrIygyEotxomdHpjxhgGcEnK/ EhcHrEuvfzpoV9yFRvl0qa+xZ4ZhDK//mbMyIzplN1VtbqqAYkuq5ywPM50L83kou62L/47 kAPVEPZWsOjOXTWm1/O7t0aafxma3OSCm/0AvE3rP5uS2oyICeeVkrYqtXVqvo/fvT3lE85 QSPGfK0EgLikjjqWwQfWsGc/r5nB1fe+Vk6nsa503GJuQ6gtCZDrDLlrGOyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1769262278; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=fJnU90IDOuZ4vqO8qd7hloXzNTB0PXJ8grC9ml4aj9c=; b=afTZdwt85DZxb5EzAKOqbUfEY/fAG0eGkW2P+/fmGelgjxDzbbgtflpdkoPcuORP0j9eu r/r53u12J/R+UrU6A4rzEWrudbQVMrHBag7STyrSgupthhGoRkOJWAMnMYzsLw5cQ2OK31Z Iupki/J5CmlYiX/Kbkpx6M5wa9Y7V7klwQEYPeEaM9cG1nZgtD9lKV9udMPgIsZg3ApCW9f dA4DJuzLTUfOoWt61CINamO3QXN0652zQ+Arlh176YHNt6FCcZXmgHpuxWEFFw9CmCGNDtw Gr3BhjmIsKsARpSsbVI9xqkjwYUQJYMkX+I/agbYMEAXSUuyKEvH3zTEzTSA== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none; dmarc=pass header.from=ffmpeg.org policy.dmarc=quarantine Authentication-Results: ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=ffmpeg.org policy.dmarc=quarantine DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1769262270; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=CsoTJj1UXHMppwM9GIZ6T9fvLtUx+GYqRA9szfAic20=; b=kOvNwVfNJJcOtrlwHSd09PD/bwWRoboT36zQ8w7Jv1EgYSN0hRf7p15lTUmcYarFExtf9 yJe1pHTLCtXBO1gq/HonmSPZrOVUQpxElDgg+D3HZM8FMRe+gkDukhGScdOMpPu3wV4Voi6 9w6RmGvPnJ0n4S+ZnDqQlZb/iQJp4pHqwACNoBGTCnpHoQsHPnAD5ypsr5ogpeLewjCwB1L XAqIBRpmKXFI6V5eGTQ+dic0NsgDhGJ5Q3Faf6mTa0WhIJuTigKNM1Hw9HXHW8uJruQ1cC4 xfvWRIoqKxOWh1KydzCUc3Ry87iB9Iqv2+HKTQQMVof85yg1x/dpJQal5MXw== Received: from 69dab402ede7 (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id F1E00690B5F for ; Sat, 24 Jan 2026 15:44:29 +0200 (EET) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Sat, 24 Jan 2026 13:44:29 -0000 Message-ID: <176926227014.25.7920595417224716845@4457048688e7> Message-ID-Hash: MNK4ZDZDN6U5ZIZAO5KXPIXYB2ULIDSP X-Message-ID-Hash: MNK4ZDZDN6U5ZIZAO5KXPIXYB2ULIDSP X-MailFrom: code@ffmpeg.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PR] unchecked-errors (PR #21571) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: frankplow via ffmpeg-devel Cc: frankplow Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #21571 opened by frankplow URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21571 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21571.patch "lavc/vvc: Fix unchecked error codes from set_qp_y" should be backported to 8.0 only. "lavc/vvc: Fix unchecked error codes from add_reconstructed_area" should be backported to 8.0 and 7.1. >>From 3384026e1340a7da707ec5d049f2c6004d452bc2 Mon Sep 17 00:00:00 2001 From: Frank Plowman Date: Sat, 24 Jan 2026 13:21:00 +0000 Subject: [PATCH 1/2] lavc/vvc: Fix unchecked error codes from set_qp_y Fixes: clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VVC_fuzzer-4957602162475008 --- libavcodec/vvc/ctu.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/libavcodec/vvc/ctu.c b/libavcodec/vvc/ctu.c index 18cbe0fe0f..e50ac592bd 100644 --- a/libavcodec/vvc/ctu.c +++ b/libavcodec/vvc/ctu.c @@ -1157,8 +1157,11 @@ static int skipped_transform_tree_unit(VVCLocalContext *lc) const CodingUnit *cu = lc->cu; int ret; - if (cu->tree_type != DUAL_TREE_CHROMA) - set_qp_y(lc, cu->x0, cu->y0, 0); + if (cu->tree_type != DUAL_TREE_CHROMA) { + ret = set_qp_y(lc, cu->x0, cu->y0, 0); + if (ret < 0) + return ret; + } if (rsps->sps_chroma_format_idc && cu->tree_type != DUAL_TREE_LUMA) set_qp_c(lc); ret = skipped_transform_tree(lc, cu->x0, cu->y0, cu->cb_width, cu->cb_height); @@ -1937,17 +1940,20 @@ static void palette_update_predictor(VVCLocalContext *lc, const bool local_dual_ } } -static void palette_qp(VVCLocalContext *lc, VVCTreeType tree_type, const bool escape_present) +static int palette_qp(VVCLocalContext *lc, VVCTreeType tree_type, const bool escape_present) { const VVCFrameContext *fc = lc->fc; const VVCPPS *pps = fc->ps.pps; const H266RawSliceHeader *rsh = lc->sc->sh.r; const CodingUnit *cu = lc->cu; + int ret; if (tree_type != DUAL_TREE_CHROMA) { const bool has_qp_delta = escape_present && pps->r->pps_cu_qp_delta_enabled_flag && !lc->parse.is_cu_qp_delta_coded; - set_qp_y(lc, cu->x0, cu->y0, has_qp_delta); + ret = set_qp_y(lc, cu->x0, cu->y0, has_qp_delta); + if (ret < 0) + return ret; } if (tree_type != DUAL_TREE_LUMA) { @@ -1955,6 +1961,8 @@ static void palette_qp(VVCLocalContext *lc, VVCTreeType tree_type, const bool es chroma_qp_offset_decode(lc, 0, 1); set_qp_c(lc); } + + return 0; } #define PALETTE_SET_PIXEL(xc, yc, pix) \ @@ -2123,7 +2131,9 @@ static int hls_palette_coding(VVCLocalContext *lc, const VVCTreeType tree_type) transpose = ff_vvc_palette_transpose_flag(lc); } - palette_qp(lc, tree_type, escape_present); + ret = palette_qp(lc, tree_type, escape_present); + if (ret < 0) + return ret; index[0] = 0; for (int i = 0; i <= (tu->tbs[0].tb_width * tu->tbs[0].tb_height - 1) >> 4; i++) { -- 2.52.0 >>From b27e7f88740492fb116d51e60e261e47acace578 Mon Sep 17 00:00:00 2001 From: Frank Plowman Date: Sat, 24 Jan 2026 13:41:31 +0000 Subject: [PATCH 2/2] lavc/vvc: Fix unchecked error codes from add_reconstructed_area --- libavcodec/vvc/intra.c | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/libavcodec/vvc/intra.c b/libavcodec/vvc/intra.c index 52a138ef1c..eccd8ee4c5 100644 --- a/libavcodec/vvc/intra.c +++ b/libavcodec/vvc/intra.c @@ -225,21 +225,23 @@ static int get_chroma_predict_unit(const CodingUnit *cu, const TransformUnit *tu } //8.4.5.1 General decoding process for intra blocks -static void predict_intra(VVCLocalContext *lc, const TransformUnit *tu, const int idx, const int target_ch_type) +static int predict_intra(VVCLocalContext *lc, const TransformUnit *tu, const int idx, const int target_ch_type) { const VVCFrameContext *fc = lc->fc; const CodingUnit *cu = lc->cu; const VVCTreeType tree_type = cu->tree_type; - int x0, y0, w, h; + int x0, y0, w, h, ret; if (cu->pred_mode != MODE_INTRA) { - add_reconstructed_area(lc, target_ch_type, tu->x0, tu->y0, tu->width, tu->height); - return; + ret = add_reconstructed_area(lc, target_ch_type, tu->x0, tu->y0, tu->width, tu->height); + return ret; } if (!target_ch_type && tree_type != DUAL_TREE_CHROMA) { if (get_luma_predict_unit(cu, tu, idx, &x0, &y0, &w, &h)) { ff_vvc_set_neighbour_available(lc, x0, y0, w, h); fc->vvcdsp.intra.intra_pred(lc, x0, y0, w, h, 0); - add_reconstructed_area(lc, 0, x0, y0, w, h); + ret = add_reconstructed_area(lc, 0, x0, y0, w, h); + if (ret < 0) + return ret; } } if (target_ch_type && tree_type != DUAL_TREE_LUMA) { @@ -251,9 +253,12 @@ static void predict_intra(VVCLocalContext *lc, const TransformUnit *tu, const in fc->vvcdsp.intra.intra_pred(lc, x0, y0, w, h, 1); fc->vvcdsp.intra.intra_pred(lc, x0, y0, w, h, 2); } - add_reconstructed_area(lc, 1, x0, y0, w, h); + ret = add_reconstructed_area(lc, 1, x0, y0, w, h); + if (ret < 0) + return ret; } } + return 0; } static void scale_clip(int *coeff, const int nzw, const int w, const int h, @@ -586,11 +591,14 @@ static int reconstruct(VVCLocalContext *lc) CodingUnit *cu = lc->cu; const int start = cu->tree_type == DUAL_TREE_CHROMA; const int end = fc->ps.sps->r->sps_chroma_format_idc && (cu->tree_type != DUAL_TREE_LUMA); + int ret; for (int ch_type = start; ch_type <= end; ch_type++) { TransformUnit *tu = cu->tus.head; for (int i = 0; tu; i++) { - predict_intra(lc, tu, i, ch_type); + ret = predict_intra(lc, tu, i, ch_type); + if (ret < 0) + return ret; itransform(lc, tu, ch_type); tu = tu->next; } @@ -726,10 +734,16 @@ int ff_vvc_reconstruct(VVCLocalContext *lc, const int rs, const int rx, const in if (cu->coded_flag) { ret = reconstruct(lc); } else { - if (cu->tree_type != DUAL_TREE_CHROMA) - add_reconstructed_area(lc, LUMA, cu->x0, cu->y0, cu->cb_width, cu->cb_height); - if (sps->r->sps_chroma_format_idc && cu->tree_type != DUAL_TREE_LUMA) - add_reconstructed_area(lc, CHROMA, cu->x0, cu->y0, cu->cb_width, cu->cb_height); + if (cu->tree_type != DUAL_TREE_CHROMA) { + ret = add_reconstructed_area(lc, LUMA, cu->x0, cu->y0, cu->cb_width, cu->cb_height); + if (ret < 0) + return ret; + } + if (sps->r->sps_chroma_format_idc && cu->tree_type != DUAL_TREE_LUMA) { + ret = add_reconstructed_area(lc, CHROMA, cu->x0, cu->y0, cu->cb_width, cu->cb_height); + if (ret < 0) + return ret; + } } if (sps->r->sps_ibc_enabled_flag) ibc_fill_vir_buf(lc, cu); -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org