From patchwork Sat Aug 27 13:58:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37513 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp897830pzh; Sat, 27 Aug 2022 06:59:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR42zzYW7Maddg+lxaRMk3aVOm4HcgQcCmajqdOSQbmWBy1JHoLDpCQRYiaM+4XF1I7Jf/Jt X-Received: by 2002:a17:907:7612:b0:741:6559:de26 with SMTP id jx18-20020a170907761200b007416559de26mr113116ejc.582.1661608757150; Sat, 27 Aug 2022 06:59:17 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id b2-20020a05640202c200b0044777dfdf09si2913130edx.296.2022.08.27.06.59.16; Sat, 27 Aug 2022 06:59:17 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=J5373XEV; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 55CCF68BA53; Sat, 27 Aug 2022 16:59:10 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2035.outbound.protection.outlook.com [40.92.89.35]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 231DB68B8BB for ; Sat, 27 Aug 2022 16:59:04 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kScNOv7Fcg8B1q3RwqwfwyI2BydD4KyPxVU5y5sVQBwJb+qAtoMTPqfUXkid2GL17qzsFc4hZgz8i/FiBKm+bHim8h5ZjuKiEfsoSbrUpVhhEyVHPjCU2VFyUHzmuMU8Lfu8amy0/vVfRw8rHSDbfCwv+ydaOR6U/rfcyO1EtJA9M2gy7V30hv2WBRz1Jz9qHJA7NcW1RvSQ/4zdlJUbgeM4JnbBZmVel/bbcOfYDnSR8noYF7Lt8Xdghrnh+AA7RGXRoYTOfwU41buxF/3yLHg6eFPj1nZ/0JugT+vF3IoFgE9PfICys7ejS1KCFXqoIN8PXG0xaBprF/fKvPT/TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=X0ZyZLwNsXnjYVc04tluU2mmdwfZGzOluHg3PtF4kys=; b=bkymjKp5PH4iar+xgAhB9UxfORRA3pYLnM3s0MP65ypzkVVW/mfHZCPMVd9uxSpiuNfPpAfuUcsapgaDahz9j2ldrKvyxLjlgCIBjL4aYwnimgDaSa1rkFll5Fz0MobJe4kRtU4HuaJ6Ur/w4T9vXki94LYy+FrWbgLNhajgKylAbA63esbyYqIEAc2Ji24cAZZtf3w/4OFSFWYdJTRQuycQ4GNTfSizFj8kC/tbBsX2EsftlnM45e60QhnsBGOipohX9Onetk4zoczcTwo+841Qb6w8ld3a5faBqt/baplSkTX66at/HVDbMsWModkin9a8GX7kX89tavcYCuCVIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=X0ZyZLwNsXnjYVc04tluU2mmdwfZGzOluHg3PtF4kys=; b=J5373XEVgz7mufSPMrMdHKdZ1+Hu2lPSOahiRdTukkfnC4RNEfeVDGD5lTcY5p7y5lTETAjBNSCuWR/7PovyOjDjrWzNrd97okrKSjIxL+b1TjgHR3IBPj+No7vKR20xS7ylEk1VRzxd6/Z75mLZ7Ptx8uGuHDb6vbkeeg1nzaWWb7Hz4AYCwJ7Q08z7rZq1Y2Nz/ySJ5D48bOjSu9bEBjDQN9/biovVs6dirPr8LbBPH5HEih9PKhkN9AD1KESJPxp+wI2LRf4L3R1CBADE09/SaPgNPcowegQNWsseHQV63RmQe5vUFL6lefjSQn4IYDiegjlcM/XzSfNkwKY30g== Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) by GV1PR01MB8578.eurprd01.prod.exchangelabs.com (2603:10a6:150:2e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.14; Sat, 27 Aug 2022 13:58:58 +0000 Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::4cb9:bf7a:dbc5:fe84]) by DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::4cb9:bf7a:dbc5:fe84%7]) with mapi id 15.20.5566.016; Sat, 27 Aug 2022 13:58:58 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 27 Aug 2022 15:58:47 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [7UROWzrfsRbqqCPGJQQBcqziTEh0Ul2p] X-ClientProxiedBy: AS9PR06CA0218.eurprd06.prod.outlook.com (2603:10a6:20b:45e::7) To DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) X-Microsoft-Original-Message-ID: <20220827135847.3001236-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 45acbf0d-9d8d-48eb-da8b-08da8834496b X-MS-Exchange-SLBlob-MailProps: EgT5Wr3QDKzcD1i/Ys0YOZCNnqXzGH/4QZbLvl/awHdlaPLM+BIrcHZfJDXUC+mjQPFuEL5jd2MGSJ6Pb5iBFPhcVchKa6DOvLGpNfhFQwfQQfse8Y76F8afL4BwUi/Kg1pvtHwjlsTOX38A7EABSu0RAyyIkfbEEUMefwIFLyAKZTpnR/a/6efwXwa3V5kfPpH+7fPceYyyxferw7D3cWVMmVKiCHzBwrk5hj3LlNuc+o1TBT9+3QjOP1SDykudZXiZLwVtAxEbqizrEG68+TW2RSi3J+W0T8ISHuq/Covn5SeiVqS0fOSvKX5w/HStdinQqn77Zz3iUgGSrgN7zzP+hl3sPwKiFjxWw8tpZ/jjKLRNdpnLF2ihfoTHexAoazQhOn5QGrbIaXD0UvdqMRC/PoLfUR3Yf8Pvz0NEWa2poQhzvxDiQbapG7Qm1CjkZsjKXjweDpNB8A862+tutAl233SJvUzLCUT1AFIj0FQ60s/XOyHM4Ztxm5VCnSXrGJ/E3HA/FFaehw5vQqpzkkglWCBN1eSGcmIQ+0Jy2fWwqz9uEy1hvPxOYZO70q1D6ZFtMP6GpdKffR5tuJ/y5U7KieGbvo5MyFTFnZh7LNhMWkoGu/4NzO7Ltho0Gx1Ps8sbcLhjr0n0JyFfxs8yDnRsYh29ybowl2bDlqUQwk+72PMMahz8uCszS+h3JVCJ6hvXXEB0BgTeikO/sWnt2zQ5DncCiS0vZhm6WbV0Za4= X-MS-TrafficTypeDiagnostic: GV1PR01MB8578:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fu1NCMYsIgsgmBygWJhpjUmIkUY0ai5tm3lbgVjE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8nLeHreOD5f64OKgiiVbvYoOKl3Ul83xVdewLrcHerDYuJdYzgu6WWT82LHYuYoNQgc2zQ+wRrRBYLVx9PxdJ3RWxrsmuTZQDc1O0T9BT9S275aenLP0Nbdpvxtxj5HW+541uBsdqsRmDf3GeKb2SgmRFGUmTI+hKVYTN7cdzkfyXwMhY1m3Nf1FdsrigNHdddiEUiCQTqMdKImhoTgQxjeuNJCT59W9XKkCLOoHfZFiFSV83UWQ7RofnMQSP3ntgtqKSF3ouNLgUbG7CUAP3AjdT8UP7Qekrn3UcXaI1zQJ2e+3mZIcBjbjt8waTjZ0m4+SgWReKiqakIidixfGf6jZPCd7/Nxw0xmoMOMeBPc3j3QGIH5/TVbPDCu/3LB9xvft4xswQFO3Xc4O3jFEo/vtITHQzEMf5ERemlc4x+M5ZHFR+I4NXHAcZEEWzTT2lbqaHm92o3Eqq1mPANTcs1cOPaUv72hUbMeIxUXDrB//X4juld37hVxf+n8EupkbhgTl8xWYwQwm/qgBDSGOgfFPNtMl5Q4/eK1lFxcTcHeIZ/CJBOIzSP9HHoEg2b1rwm6dMkQkOQMLdsJUBYlSdW8flpzPHC4er5ix3NRKwJT1Y9bwdbiKfHSA/ZO68DmGWydCfT96YF/BQrXMlDLuKWVRZz5XuWAdKF/XwLUlhefAKI7W6D3ejuyDg/NHkg4JAB8McH9Y6bMpU/EHH/H/UON/7+v4sWaMxr6PfQqALbsvwRGa/Oodl2SlUtV1zaoIF/hniiiwlECM7Ex985P6njA673FX73B5+YBa81K9HSJ/xkUad7aB8d9psru3hI0xkzTG/d83/gdGYS9QdkM2crXOQ2ym8eluA+BVQzdxbH+tkfV1rN8jsjMIaEdUTDGFWt/JhH57bZXedY= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 45acbf0d-9d8d-48eb-da8b-08da8834496b X-MS-Exchange-CrossTenant-AuthSource: DB6PR0101MB2214.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2022 13:58:58.1422 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR01MB8578 Subject: [FFmpeg-devel] [PATCH 3/3] fftools/ffmpeg_opt: Check creation of new program X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: yKhudYjsnNSB Fixes Coverity issue #1512413. Signed-off-by: Andreas Rheinhardt --- fftools/ffmpeg_opt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index b0b8ecc868..74427cf80d 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -2753,6 +2753,8 @@ static void of_add_programs(AVFormatContext *oc, const OptionsContext *o) } program = av_new_program(oc, progid); + if (!program) + report_error_then_exit_program(AVERROR(ENOMEM)); p = o->program[i].u.str; while(*p) {