From patchwork Wed Sep 20 00:30:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 43850 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:a886:b0:149:dfde:5c0a with SMTP id ca6csp307110pzb; Tue, 19 Sep 2023 17:31:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGfqSzUstm3j8+igsq5QTbOnYnzUOX9r0cEXRB0vBynaeWrifF7zn4lzDamdU6sV2piCJ1I X-Received: by 2002:ac2:5f73:0:b0:503:3827:bfa9 with SMTP id c19-20020ac25f73000000b005033827bfa9mr767934lfc.34.1695169878928; Tue, 19 Sep 2023 17:31:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695169878; cv=none; d=google.com; s=arc-20160816; b=gs6gSVw32CPSq7xT7/B58ny/+faBoAVyg92NCY2+/zu4d3sR+M6QSA7q3tRildmPQ0 pJvztiGAMV4pNNLI1Q9XWniJmzN+YtCFaBXyXKYP3nwrzns2HFxA3zPWnpKJJ0fTIfNk 8hnVBPP7bjy+Pa0icWL2sFY8YY91owOkvGd8xJPVRZjZye1XJNxIUS8ht3mGZv4W3jWm yyUXwqqhtqu8G4n4ecFTYhwaSzKSwmvUK6UkBr0ylcQAaVtPiI5QRZ6XrJ6RJey+P5p3 V8PQ27Od10HOUt3EBGtBssjc6B9cVJGJCrl9QfAUwzpfirCVvaxR7KscyE9n92INc6lm iwhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to; bh=MS0a1cYNc71IpmSPFvwhH6ZKLTVMzhuvyc3SBQOg05I=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=jkETi8g46S4yaQGMMD3Zxr0ZeCvrVXHIv3x/eU3fgpWS+VitkxzaX6ux+uBhzhQutK 4TidG9o9DOp0QSfCezuHkJndc3qi1KfISDbyPJ+vBJwzkQp7G5efVnxP/BxYiUgC8V4P OkHaO5tUx6rM3zBlhhhZYIWURxvNxWa/0PiLgNEtM5hFv4GXKmkz1h5mlUcdyKi5hQN8 kqce2Uwve+6UtYCZvEyU9TZbcP9EZlCt/1xXsYDrd7WJ1gnnpQg1He96E+cSXFJQpYUv rjrnomKXYA09/ldXWZq0A98swEH9FkHwmIKG+4eDiSJMd8h1bCyhGXGFDYoWk15P2zzW TTKw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id n24-20020a056402061800b0052a1d3bfd90si11148498edv.372.2023.09.19.17.31.17; Tue, 19 Sep 2023 17:31:18 -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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EA30668C919; Wed, 20 Sep 2023 03:30:47 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8994068C90A for ; Wed, 20 Sep 2023 03:30:38 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id BA56560003 for ; Wed, 20 Sep 2023 00:30:37 +0000 (UTC) From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Wed, 20 Sep 2023 02:30:33 +0200 Message-Id: <20230920003034.7241-4-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230920003034.7241-1-michael@niedermayer.cc> References: <20230920003034.7241-1-michael@niedermayer.cc> X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 4/5] avcodec/vlc: free multi on fail 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: vb8m8VSYDKsU Fixes: leak Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_UTVIDEO_fuzzer-6449246523752448 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/vlc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/vlc.c b/libavcodec/vlc.c index 3b66c943546..acc081e8b74 100644 --- a/libavcodec/vlc.c +++ b/libavcodec/vlc.c @@ -478,6 +478,7 @@ int ff_vlc_init_multi_from_lengths(VLC *vlc, VLC_MULTI *multi, int nb_bits, int fail: if (buf != localbuf) av_free(buf); + ff_vlc_free_multi(multi); return AVERROR_INVALIDDATA; }