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 02A3F463AD for ; Thu, 15 Jun 2023 15:20:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9403C68C592; Thu, 15 Jun 2023 18:19:15 +0300 (EEST) Received: from mail-oa1-f51.google.com (mail-oa1-f51.google.com [209.85.160.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C527268C570 for ; Thu, 15 Jun 2023 18:19:04 +0300 (EEST) Received: by mail-oa1-f51.google.com with SMTP id 586e51a60fabf-1a28de15c8aso6554375fac.2 for ; Thu, 15 Jun 2023 08:19:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686842343; x=1689434343; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=yo8o2cI2VZAgPU6ai5sDHQ1E9xAxVRlOSb19oaGEx+o=; b=cP0vGpX0EqR41K79SpGGNNWrsJfiWE4IOGD/aqcN5+hTFGVvuntAIPZ4ReQQoZv8HX h7JR806stkD4zdNckTskFHd6Lj8ixzNQVHooWKSDt/ueEVFWipsSwulGcHcS+fxjwmop 7OlYceTegjCRtJVon8xAMrrwautf4fHKXjn8FpPc5cMuiOSwW/MoK02VZpLryV813/9n o/hwJVsIWawk/LQnB0y+EwlmmxR7mBggaANAJ8cR5Eb6jwquxGHajCiq60OlLRVp7rEG LEO4FBaFQEosrZGwEAvBXBJ0FHvdZWC5Anw8t3VOmjpChHLE6RkzRLV3f6IzqE4WYSYI DxcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686842343; x=1689434343; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yo8o2cI2VZAgPU6ai5sDHQ1E9xAxVRlOSb19oaGEx+o=; b=Kvf3RvfkfO96KGIZNUhCgbPn66qY31wKWLfzHAFQ33Bt6swCYoa50C8z9WIZZo67py 8imHKkp5ww7qKa6uHFxnP1oEXtjiz5V3wdIjJZ1OdHepGesNqv9PNObey73d1JZku+PM TCISbnfgsqxd78UtFgyyyD0353mPdb4AZiKdnULU5QeJD5WBfECa5uBeKR//PIEVk403 92DNqLykO3SSKFdWw1W3MCO1wKaH94s8hUHHDca693l+DYYL06CdR/yZXrmIrbgDR7et LQ3xsCM9FE1Hn9V4i1q3liV7BmKCTCtjVsPqejEN3Ypm+U1q1iwWp/GrMNvFKfcvXDJ6 qZSw== X-Gm-Message-State: AC+VfDy6+ceotCG/zJzXZ6uLbED1+z6fX+Jnm6g2ke/0vupB7sUj8kD1 t+TO467VUmkZpWxbbb3pu1FphpKcOlQ= X-Google-Smtp-Source: ACHHUZ6G6FS7Sh2C/CbnazSDSTndAxf9Og2iNptPqgVEyzS6hKs4+KzRf0h6lGMFKaoTY4fbRete5w== X-Received: by 2002:a05:6870:8445:b0:1a2:cbdd:c44 with SMTP id n5-20020a056870844500b001a2cbdd0c44mr14331052oak.9.1686842343268; Thu, 15 Jun 2023 08:19:03 -0700 (PDT) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id ve17-20020a0568710c1100b001a6a3f99691sm4748405oab.27.2023.06.15.08.19.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 08:19:02 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Thu, 15 Jun 2023 12:18:32 -0300 Message-ID: <20230615151836.50535-8-jamrial@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230615151836.50535-1-jamrial@gmail.com> References: <20230615151836.50535-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 08/11] avcodec/evc_parse: free pps struct on parsing failure 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 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: Prevents future checks for their presence from succeeding. Signed-off-by: James Almer --- libavcodec/evc_parse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/evc_parse.c b/libavcodec/evc_parse.c index 3e315526fa..4b9d820d34 100644 --- a/libavcodec/evc_parse.c +++ b/libavcodec/evc_parse.c @@ -367,8 +367,10 @@ EVCParserPPS *ff_evc_parse_pps(EVCParserContext *ctx, const uint8_t *bs, int bs_ pps->pps_pic_parameter_set_id = pps_pic_parameter_set_id; pps->pps_seq_parameter_set_id = get_ue_golomb(&gb); - if (pps->pps_seq_parameter_set_id >= EVC_MAX_SPS_COUNT) + if (pps->pps_seq_parameter_set_id >= EVC_MAX_SPS_COUNT) { + av_freep(&ctx->pps[pps_pic_parameter_set_id]); return NULL; + } pps->num_ref_idx_default_active_minus1[0] = get_ue_golomb(&gb); pps->num_ref_idx_default_active_minus1[1] = get_ue_golomb(&gb); -- 2.41.0 _______________________________________________ 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".