From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id B698547758 for ; Thu, 21 Sep 2023 17:18:21 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1B47268C8C7; Thu, 21 Sep 2023 20:18:20 +0300 (EEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04olkn2075.outbound.protection.outlook.com [40.92.74.75]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 29BBB68C5BF for ; Thu, 21 Sep 2023 20:18:14 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D2d8hnIvKNhtHi+33Y+NCAwoR9zmKPnHM6gtIhXopWhLq9Zjqq8cWTpQ4zQHzq77fZpAvHnZZmu1j3PsDN7iWODj8T31T1navyjVTqd3LlUDo6/GoNXcrXe60vhB+bmGHe2RrKiv4dPPyAs4+iN92oPEn9c9yykhF9vcQ7my8QxTk1D/FjDu+1KuhQHiab1IExZKOXCLu5cG7Dfol1/rtrO+IBwaFf5/ufhRL8HysbvkvnsMFfMmah2VZzuU95qLubz66mf4Y5RPmM49FeXUdPq4wv9sCYEiB4rV9iC7Wl4L5BKDa5k17CXW3icHI+nanqX0oDSHnBkShMb/sNlLqA== 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=ZYUd42WMrpdfWYJE43mPLPEwmugF6ar7lImC6W2JOtw=; b=WubhAR3acXPK55SqLDmzwyQpqgZtEhBC8YnIKqzSBN/IYMCL6sUU9lad/0whD94vd4vTnghfgoBZ3IWmWWuy8ycthJmXEcpOFJIY3EftkKrlFPnHGOvJyULFbBQGXh7BdoDHrxzHrT48mBW8bJlouKXSny0dqQFgopRym2ONOlExqBHRcEdC9jhmkL+wj5ZbGqy9ITSMXsu0eqrXkB9+qFhzFbGQNINNHhNYbK9uRHYiW5FL0NW2gRkRMUGubzNcSqJnoD1pnCwSYZ4snPFvCRi+ZVD58Aa7p/KzIvBxc0kIJKaS3TliDFyOR4a5H+JeMFy8XIgmB3bkunDmYGyBmw== 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=ZYUd42WMrpdfWYJE43mPLPEwmugF6ar7lImC6W2JOtw=; b=mcT3isYeejY/WTH0xUTz8r8dCfl0YowXdF/UT12Seb6Xj3ka0jd8Ni4oei6p0RstJAqcWqtNYD9a+0T4DiTvGThQ9RSYtly6CZy3lNFdIln+NLbMn0Css9VeRaTb9JFSS3eQtLjr6gyBw2EY5cuJGccFQTMV2WFxbpkePRjZsdTlH1x7pJrQ5rFn3w9dyudC0rG/ywKaZmOuCRxxGCLwauz/MxwEA/1yKnSB6XnaC2r+WWQiHUmyl0pMRihdSse3OREEpXOhhqWsrY88BabcMC3ApD8ZwXetzTZSu1Tdskw8mVcYA5gZJf7y0mWWRIPx6rgQiHSEYhO6/rrvKOWYRA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by AS8P250MB0363.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:37e::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.19; Thu, 21 Sep 2023 17:18:12 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6792.026; Thu, 21 Sep 2023 17:18:12 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 21 Sep 2023 19:19:17 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [tBgFRRzJ/664khq1DZ60RF7MLdQIikOr] X-ClientProxiedBy: ZR0P278CA0020.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::7) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230921171917.1457617-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|AS8P250MB0363:EE_ X-MS-Office365-Filtering-Correlation-Id: 4fefb558-44af-40f3-62e2-08dbbac6ba8a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 11srMP1zZm/anSdKMZCVLhrSa2L1W1oU8h7hkSCPoLC4C6RVb8xk7hFRn5hj6ckTFYrVhEeRBeMmomvvBF1A4gYlviWb+szx0LRevdN3MMrMHBslMuLmxCEYy9hfE0fE0+Q3QNItVcahqTShCdMc1UvGD8aHT1VXN9K2vE+xbTQhHwr0OOhODhJEtUS032zh6zrw8tkDg3ID8STEaiUgkpm0dM/5cpoEwiFY4r8xMzLzGoISPdIdHbj/O1rzSG+MUFkMS/+z20SnknlI0E9cNScWqtBMaLmmg1xfZeRtgXNjDHGR8faOZ189y6soTYRep6unDysIB/tFrXBQ2b7e5VfcduD74foZ/X1MAL3RPCkCwdMwj9QN2zIsUpskS24e6ANyeE45f3Qz+sInoRG/rcpEFnjOYJDQ66pRGjb79Co9vL8IkqTcZspdQMRz3Ltqf5WibkLRO6TLBguqkPbktolkcRoVIMd8fTz0y6F8lRlPWGBJRvnunvud78/pNHLGhigv+aqSQ86FTzvwy5fMur0UHZ7wxRqOKF7UEfvH6XbBeKQXXna1Dz/CZedw3boHk79Cn2xGxpJhPsYl8TyItmKpKa88a17YsBXWE5qXxIZeYn3qD/ZMTgpj1LgUf+eU X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?8BWOnKdA4jiOGhDvCs2rbbVTTyruOsnndHgwL7VVCMp7RKxhR1OjxsNQPas2?= =?us-ascii?Q?Cak5k7cJikbuBUDrm+IPANm1Iq1WmmhuD/gEzkFxpxqDfrJW9fLtJN0Ry2pX?= =?us-ascii?Q?Mkp/HzkPgHgy1nPyIzE9eQJwZC5g8Rzw5gCRd+wbD6MYyuRmw2luz0PyrKXd?= =?us-ascii?Q?UFZQ/Vj0fSytGpZX7UMEj2ZALwBO5biH/86QdfCiAr/lcykJ0oPkj0PbD78/?= =?us-ascii?Q?vWVNenW+zNX6ILd5ijOtx51ID7fg6hSryy40i21NriEK3dpVYnGSBuUz4lQ8?= =?us-ascii?Q?1wMR2y6p3U3uMPzjIZDu5tIqOSJeWTXfufuhkMRM3GK0q1dcjgV+n0pg7ZNC?= =?us-ascii?Q?Q983gWVAaha/KrH12d5C7V0QUX81g9FgweXLi3RxfTqC3SucDrkAYIzV+CtA?= =?us-ascii?Q?DgpajNk4GvH3gLay4lQeBxo0iXgq2ACd0hNE+aflJZKvswHNvkMYcaziVdxL?= =?us-ascii?Q?26qYUV+ATB9Fqu6gsP6Xy+NNCj8NTwh150s/LH1fznfRVmaZ420+YlyKxyR/?= =?us-ascii?Q?by/bqrZOO3RT5f7H+iI7u2+1LJyfYXZJaL8KW0X5Ff7WFw9ksCeOmOgT4pNL?= =?us-ascii?Q?lmiilrC2ybqx3iyQh6uy/6Py/JureCQMvaydFSa3qwlZsOeVKoc7TxRhQAFe?= =?us-ascii?Q?hHg+OsmkvPYBvYhPSyAXrboEuvKh6LxtZRn+9KR0zkuCKL5FSSGRDbTbWbt8?= =?us-ascii?Q?mF47FKGkoJeqY3T8WFNtn1H0zbT1lbpmGJcdqRCs+vOAZczgCoZBrd+IYkK8?= =?us-ascii?Q?7OCfVHtF2XNtLlgV3aI/C2anqM4TA0chJN85IwIUHtAHqlPI9DE/lP7NeoHF?= =?us-ascii?Q?k+zN6+SRpOJUJl2eOtKURpgpLL/dQpTJB3E2eoBAjnP6lfEO7OS26+Ssovht?= =?us-ascii?Q?C+eZk//E0xJM5d2hZrFCQ3/ryV08FxIu/z/MGZDay2PYz/HIkDOGB/LUkvAx?= =?us-ascii?Q?t9N8By32iUQAkslPk1UkRUKgQUFGJRqgGB5M1lAc4aDTDFxTkB8iVwPapLCz?= =?us-ascii?Q?HLe3GlrQhjN/64yinfymyYy5kv33GXbaClbDFeGUrnNUlusf+XKVC8eCywdd?= =?us-ascii?Q?1NZfjfOvFfloeHSZnDoSj99HHavaHxCv+yZOhf1UqROrvK3kYn5Hqf5DIL9Y?= =?us-ascii?Q?EiVCpAwZNTvVUUhSxjd1GUoSRhCq0PRF0oSCYMXm2UrTbGNB0Yg2d6EY476I?= =?us-ascii?Q?f1/1SyizzdsSqOcuytK4m8wjWAWDMSuVaj+vCnM74Wt9YkR44vY7qJKmvGOX?= =?us-ascii?Q?AvMgOKeq/qrxPILK+8Zf?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4fefb558-44af-40f3-62e2-08dbbac6ba8a X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2023 17:18:12.1989 (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: AS8P250MB0363 Subject: [FFmpeg-devel] [PATCH] avcodec/evc_ps: Fix leak on error 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Regression since 4565747056a11356210ed8edcecb920105e40b60. Fixes Coverity ticket #1545072. Signed-off-by: Andreas Rheinhardt --- libavcodec/evc_ps.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/evc_ps.c b/libavcodec/evc_ps.c index 6f93f5b373..64d60f44e2 100644 --- a/libavcodec/evc_ps.c +++ b/libavcodec/evc_ps.c @@ -243,8 +243,10 @@ int ff_evc_parse_sps(GetBitContext *gb, EVCParamSets *ps) sps->max_num_tid0_ref_pics = get_ue_golomb_31(gb); else { sps->sps_max_dec_pic_buffering_minus1 = get_ue_golomb_long(gb); - if ((unsigned)sps->sps_max_dec_pic_buffering_minus1 > 16 - 1) - return AVERROR_INVALIDDATA; + if ((unsigned)sps->sps_max_dec_pic_buffering_minus1 > 16 - 1) { + ret = AVERROR_INVALIDDATA; + goto fail; + } sps->long_term_ref_pic_flag = get_bits1(gb); sps->rpl1_same_as_rpl0_flag = get_bits1(gb); sps->num_ref_pic_list_in_sps[0] = get_ue_golomb(gb); -- 2.34.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".