From patchwork Fri Nov 27 17:46:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 24123 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 7D63944AA55 for ; Fri, 27 Nov 2020 19:51:31 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7F90468BB00; Fri, 27 Nov 2020 19:48:02 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8205F68BAB3 for ; Fri, 27 Nov 2020 19:47:54 +0200 (EET) Received: by mail-wr1-f45.google.com with SMTP id k14so6436405wrn.1 for ; Fri, 27 Nov 2020 09:47:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=pQMQrQMRBMZNJWqxhBvC6kLz+SkCRJBFp4EH2uuCw/0=; b=WDI7Njmo7fXHVbTzXHZf17ebK3EXRt0yCsPghCzIqx5XsEt41e7CwW8X/i2+sTzO1/ eyUHVrsdqlST/A2nEZyDSXfgkyM0Poq8incebIRSdOZC2COJ1lU+uA/odSIB40KfEqjQ kzKw7VzcqpUZZgICvuVcDDzxqUceeMPnRVvy/wd+2o96A7BJUafGGeEpx5kzb2ZYduyQ jFEHabjoxuKIC2O3lQitgg0LLgiYaBCwh2Jrrsi0Avj8rOZxjdHMIWlGpWpINrD2yOZD V0c152J855tyhg42NRT76uR8cPwYFWD91YhecD85sIWughxBJiUObjxXd3A8AAWpDoMq QtTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=pQMQrQMRBMZNJWqxhBvC6kLz+SkCRJBFp4EH2uuCw/0=; b=MR4dwSv72cYWY8WoVolSzaCPF8YbVLCm2w0S5eTxqH6Z/M/tMtIMtZopeCFF1c2wRg nPHjdEsp2bz3madI3Yvyc59/nCBFdjOIpsKKyuP3hMfT6yviUzZ4lNsIfRLsy/xEO4Kl spyU5VhxGkMYlbnecZFpnXFl8ub6kOMgnwOdtSJLQlE6evE3Jhc6z/3AHMNFPMCaRgTW 4WT5rAeuAKKyj4Ura73MIq5SDMqHvj1954M6zAKmumZMJy0EaeOWkZZk/BLhtKy2eJ7c 2TkhRJeQNW5CHZ1kdZe7A+Nvi6YXJA+yrfD2DkYAuelynmIXODnuBgAIups6SuM91xq8 xXCA== X-Gm-Message-State: AOAM531pv9Sc01EWG82Afe29L9jGoeypqo642CzGNOHu6M4XvREmDotz L2fpFTn+B5/1QJsK/5I0GyZa2VM4gzsS4A== X-Google-Smtp-Source: ABdhPJzygp/KdgpNEUMDb8Wzru+I8V/Te81hH3gQgfRCHBsxjECv69v2AJmNbzek7RGlWTzxWLZpsg== X-Received: by 2002:adf:fe82:: with SMTP id l2mr10330149wrr.232.1606499273604; Fri, 27 Nov 2020 09:47:53 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id r13sm9941700wrm.25.2020.11.27.09.47.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Nov 2020 09:47:53 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 27 Nov 2020 18:46:48 +0100 Message-Id: <20201127174652.2838198-23-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201127010249.2724610-1-andreas.rheinhardt@gmail.com> References: <20201127010249.2724610-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 68/72] avcodec/proresenc_anatoliy: Fix memleak upon init error X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" A buffer may leak in case of YUVA444P10 with dimensions that are not both divisible by 16. Signed-off-by: Andreas Rheinhardt --- libavcodec/proresenc_anatoliy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c index 8bc13fd576..85e8cb3aaa 100644 --- a/libavcodec/proresenc_anatoliy.c +++ b/libavcodec/proresenc_anatoliy.c @@ -956,6 +956,7 @@ AVCodec ff_prores_aw_encoder = { .capabilities = AV_CODEC_CAP_FRAME_THREADS, .priv_class = &proresaw_enc_class, .profiles = NULL_IF_CONFIG_SMALL(ff_prores_profiles), + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, }; AVCodec ff_prores_encoder = { @@ -971,4 +972,5 @@ AVCodec ff_prores_encoder = { .capabilities = AV_CODEC_CAP_FRAME_THREADS, .priv_class = &prores_enc_class, .profiles = NULL_IF_CONFIG_SMALL(ff_prores_profiles), + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, };