From patchwork Sun Jun 9 15:47:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 49751 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:c209:0:b0:460:55fa:d5ed with SMTP id d9csp2068791vqo; Sun, 9 Jun 2024 08:47:59 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV4OYtnCSK5uM1njglXVY9+rpZQRJWnwPhjROe1dnsB4T+N5RVYXAKeQ8AVp0UzcTmZ5/Xbl8ZjxuXtNQAIyFh/e9LnGDASfvoodg== X-Google-Smtp-Source: AGHT+IEhmW5t52SFD7UCuHh7mpvO+szb9c1IBFTRP7w12gUaEkLhorKwPH/lUe55kBVR/vm2wniz X-Received: by 2002:a17:907:3ea0:b0:a6f:1b3d:8e0e with SMTP id a640c23a62f3a-a6f1b3d9041mr125162566b.25.1717948079712; Sun, 09 Jun 2024 08:47:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717948079; cv=none; d=google.com; s=arc-20160816; b=GWp/IotNdGnhjET/cTg+4UN0XDHXepAVZ5JDJyl7PANHsA22h4rFFbR0jVpay2SYSi i4VlMjRfgPl4WvOXwnvO7/cemoYxtsmDEbndN2G7vQGDlu/fhr8bX00+oxLuahBoexnH OSy2kiKsUdKA3KNS48P/+5WeNU9aT/jbCMoc7VXgq4H9Hns6sadl1O+TgzevP4QeXsTa M284Qouv7dDf1nZnYdrxMSr//U9fjVFLjuJldOFlR5o9JTxEf3usD1Fn4n4Mlvbnmjo9 rwMTgrLLeb4cfdjDAvLvpoNo2F1jM73oagehVOrVauskM/2cjW5YzTye3na9Qx/Jaiw2 GZjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=O6bE8XDgDRGcGoLfyfiVqREAvBKOmRhUdb4J6hvMMkE=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=GbgP7mVVCQtFvC4OT/8otCa+OsKQ3teTE/JriI/IdGG/toCUtOqeisT/f+w5eC9+Uo 7qZTdiNTgKnE+x0CYsWB705JQ77ouM/YwxvtgxlQs7M6sYCZsMl6o8O1ft3nPfOk928d bLrMHaPOVLIrT0BjmXWweczPVzpJrVCQ/pm1RRyYyn8K2mUIT/MWjsQNuhXbHjX9odJ8 4awgzFCAGXjhlQRx/9zheajo+iruom/DdzR8SdlEQ1z5WnVHvjGuRWMIBTLeU6J0xT1h MWrnDeis3g8+7YUdKqJFEgwaDXlwt7Dggkixil7gl21uHdxTBA0ScWi2qY+t+5dwqY1F 8lbw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=cIVjArOD; 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 4fb4d7f45d1cf-57c6ab698f6si1733255a12.336.2024.06.09.08.47.59; Sun, 09 Jun 2024 08:47:59 -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=@niedermayer.cc header.s=gm1 header.b=cIVjArOD; 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 B504D68D56E; Sun, 9 Jun 2024 18:47:56 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 72BE868D56E for ; Sun, 9 Jun 2024 18:47:48 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 3FB5C240003 for ; Sun, 9 Jun 2024 15:47:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1717948067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=9bQCD0WZq4UbO683opWKZ9Epydno+w+Tc1qxGJtQcu4=; b=cIVjArODWrpDEDQgtjI4ycEJKTHKo3vIO+F8zA7X63MIInnkjR9Wn8yEcd/XUMO4BqGFv7 M5gBK+o1jgDoUqqVc5zFxeiSN/5aRY7h+mYZkJoZAWvqjVPsg+taxad37fTsQNdEFRpuWt FmNoBGl5ngeRpds/9Hbl+a3qKKcEwfNIdV7jPuSGLgoc5QwHyCzDgZzB8qzMI5Z7XydOIf rzcUHV7R2G1614fzTlKfQfby6z9JoPjixXMlvEN05pkguEMfqHbe2lA8RDlYNut+G/95Fn gLoBCQQlk/MCwtjsdLzrLB5zuB4btHa3Q6WLBnidgQYFNcAiBhPSaYsTy3axjw== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 9 Jun 2024 17:47:41 +0200 Message-ID: <20240609154746.4173264-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 1/6] avutil/hwcontext_d3d11va: correct sizeof AVD3D11FrameDescriptor 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: N2k4tmg3Qx6r Fixes: CID1591909 Wrong sizeof argument Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavutil/hwcontext_d3d11va.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c index 8963c9fc85b..c04ab01a282 100644 --- a/libavutil/hwcontext_d3d11va.c +++ b/libavutil/hwcontext_d3d11va.c @@ -202,7 +202,7 @@ static AVBufferRef *wrap_texture_buf(AVHWFramesContext *ctx, ID3D11Texture2D *te desc->texture = tex; desc->index = index; - buf = av_buffer_create((uint8_t *)desc, sizeof(desc), free_texture, tex, 0); + buf = av_buffer_create((uint8_t *)desc, sizeof(*desc), free_texture, tex, 0); if (!buf) { ID3D11Texture2D_Release(tex); av_free(desc); From patchwork Sun Jun 9 15:47:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 49752 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:c209:0:b0:460:55fa:d5ed with SMTP id d9csp2068837vqo; Sun, 9 Jun 2024 08:48:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV9YFI2eF7DmgGypyUE1a9RksyuXYDBmhxj2jhPHSCwGkT4gUGPWm27wQAXC45mfT2KTEouPdjfWW1GV5Ov4Rz8bTWiCl/U7mncig== X-Google-Smtp-Source: AGHT+IGNb3yntIeuKfnXaTmrPvEcPb3DaUQNZIQ2LWSoSNgVMHdIGTvkKIPAasCbmR2XD8zMVi1i X-Received: by 2002:a17:906:3805:b0:a6e:f7ae:24f5 with SMTP id a640c23a62f3a-a6ef7ae39c8mr284185166b.55.1717948090131; Sun, 09 Jun 2024 08:48:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717948090; cv=none; d=google.com; s=arc-20160816; b=EaXBXi+3wzJwAWXayJglBmh/Lc6VHQnAyQ4xVpDyjqXhOwFu0423LMmPwQYgIZP1KT uJVycMT1hUVJTPjM4rFYSmauKHwJUi4OBVNnnqbAR3iQISdSMLDpZye0rYIwCghtF14c q8ePnFgyjVxRo4RocFJxr3cVfEpEDOpzyMczTJh4us5GEQLMLM11Psh6fwNCo/dyutcA Ev2nHybkCUCNdCqqphWOj4QFyBQbr6PDdQjOxSkfnNRtm6D/JS7B8YMu/w0n0IK7+Nhd 4lW9W9AgRZxE1WJ1kXpc8m6wjPgBdA1BDXFDmO9fbIGl9Z/b4EQTHCCTNLW+CiisjZQj VuTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=QE02Na6lgorTU4OqHe1VgZBC7MofphETdWvHgiiQpjY=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=Nhinqk2ywXDMsdY0pCu8bseQo1se9uuPQXS34F1xILGnY1XgSCN4WLiLs73u+7/C/y IbvuPMFjqlwdX1XN2xqpJm1SPlK7UF4sx1KPA/O2pqlUkK3L/zkj+4SRcZimEltX6JjF hULNEeZPZOPeFOTyUnLrQrdxWojHbYKXPgll4Mec+7eKOaCfawNfQ7v5yeC/cEtwW1FG PGm+lZYkxaP8a6Ufluq9XKtMgZExAP9TLQWkvjp+21c8LDhMUd1y2XXPs2hNMYx9G6yw qoF5N8VKe3iy3vW0A/xgFuT0vvBYyBQ5k9vRBWpKJjYxIbmPmNh5nXnT9UgTbXE8gyOR Qxog==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=I8LV0T2u; 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 a640c23a62f3a-a6f0cf7d405si136873266b.65.2024.06.09.08.48.08; Sun, 09 Jun 2024 08:48:10 -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=@niedermayer.cc header.s=gm1 header.b=I8LV0T2u; 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 070DD68D5FA; Sun, 9 Jun 2024 18:47:58 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4E4C268D56E for ; Sun, 9 Jun 2024 18:47:49 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id A81A9E0004 for ; Sun, 9 Jun 2024 15:47:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1717948068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qxzXcaNI1MZYPoBt3MkSolgcMuacp4Q1U/c6uraOy38=; b=I8LV0T2uYJCl+3xDTnaRbj4vrZ4FM+tOkN2M81cFK93oTtKPylmscR2kK1YZd9iQowZozF NrVTyl0/MhXh81mDYiqlWfoTKp5IM91s3JLJTzfjnJIWGFxafIh5w8JdMMqXqLNKLPh4fr SA3R/Q3t4IfNwzP9x5mC/G0pE7cEhqHhQBe3pFr/32MPI/ikWF2bOegEjDv2UmjhyIf3M6 egLLI+hz2WChRoew3KIWKAX4xGaRPMf8LzYjQz1S+HPDahjc2AqhdaUfjpWf05EPBfc58g UkMJFeKSDy08ysHHMKrqYvzGxy3KJiwN+o+vK0LtAt0Y8akkn1sjECl9hEuFUQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 9 Jun 2024 17:47:42 +0200 Message-ID: <20240609154746.4173264-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240609154746.4173264-1-michael@niedermayer.cc> References: <20240609154746.4173264-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 2/6] avutil/hwcontext_d3d11va: Free AVD3D11FrameDescriptor 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 8b+PavQH9b/3 Fixes: CID1598558 Resource leak Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavutil/hwcontext_d3d11va.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c index c04ab01a282..9b3c5f389fa 100644 --- a/libavutil/hwcontext_d3d11va.c +++ b/libavutil/hwcontext_d3d11va.c @@ -190,6 +190,7 @@ static AVBufferRef *wrap_texture_buf(AVHWFramesContext *ctx, ID3D11Texture2D *te sizeof(*frames_hwctx->texture_infos)); if (!frames_hwctx->texture_infos) { ID3D11Texture2D_Release(tex); + av_free(desc); return NULL; } s->nb_surfaces = s->nb_surfaces_used + 1; From patchwork Sun Jun 9 15:47:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 49753 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:c209:0:b0:460:55fa:d5ed with SMTP id d9csp2068873vqo; Sun, 9 Jun 2024 08:48:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXiHJ8aFb/T9AGuayurylrGAo2OqmoO7WPaYeCX/WlJGa/PY02L2dFkCWKKJQ7ZxH1nBSHCYQlSMnDRGziuqFhaVBmy3GzmDaox9g== X-Google-Smtp-Source: AGHT+IG4gFo27TPSi+dYAku5dM3h2RPQjKzyE19bHVgO8C+VtAYWN0zrxr5qPNM4E4vwjZhekUq0 X-Received: by 2002:a17:907:990b:b0:a6e:f542:b9a0 with SMTP id a640c23a62f3a-a6ef542bac9mr324963266b.5.1717948098339; Sun, 09 Jun 2024 08:48:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717948098; cv=none; d=google.com; s=arc-20160816; b=pKPuExV77pOLs5/l2j3BCfmSzedJEQpW/ygnpw/8Yb+0otNn93S4QKhxUHhvDW6kwg tZJcSP54qBWH/jo75H16o8mvMJiavfRTEczyBUmSughWeEPu/fF0mvIEpC6bjTYZwVn5 ynxKPpBBZyGpRu4ck0eIQdwPuDJKdiV8yZ59cCRhNEV0FpAdOQ/4wA+Q87iOIAMQrL78 Qe0QR8knd2vj4WOKIaS5kX9gia7D8RO0kP9G+0vPfRMU0nmrR+QFdbPI4X+/dz+lUPYC qHGPBlsNUyAq+VBGJtzr8iJDQR+h2B0Ml9m/ZAHSTRLHL1Hii4Dsap/NkU8EhMLVSfgF OZVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=CYTIJVZca6ZFtLhGqcbNq2mSHSuACRpQ73ie4ye8kvQ=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=Lgzm4oaBsjf7cg35i/cbY0a0PUiHQub8OXFAdUs7crZXR9qR/VIog3bytffH9quLQr rwsQ5TArQ1PQJITCB41R6YJe0W2lRJgHPcVyfRwsclcl3hUA4MpxP+XnI7uxTywGXjd2 D4TAkTWVU2bkXRNduc8pVfZ8G2y95b+L4aizPgQRjD0uual3Kth6xgfYMd2MWkCjYLfz fEz/OQZJDvRDhbzm1ifmAyu54J+tSdf+ko9WWagt2CSnLI0guRMysAzuiKTSqWXQSYLR 6GS5WiuPpBFcvNAzWqP9UCTyUYYLIhj7RgYVCxJ/Y7K4hdIjhoUzAdKKL4dO/uWVm75B C/OA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b="XH/7oglV"; 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 a640c23a62f3a-a6f0feafdb9si124707466b.833.2024.06.09.08.48.18; Sun, 09 Jun 2024 08:48: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; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b="XH/7oglV"; 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 520A468D616; Sun, 9 Jun 2024 18:47:59 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5E3E168D5A6 for ; Sun, 9 Jun 2024 18:47:50 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id AC7AE1C0005 for ; Sun, 9 Jun 2024 15:47:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1717948069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=79+6Y9FJPL9YXOCYI2LAXuv0ZfLalGAgwcas2MdwEZY=; b=XH/7oglV/xw6rkw2zvHdqZV43BFemKHQhwSY5DsH7iWCMeqobROA1GT9p9E4BdIaALxVPB pCUwaR19+IvRzGKBKCXrXJymdY7F/CAkp0JucTFYkWfZzU0g5wV66lns8qAq/FYm8ch68O DzE9hVo2/JtST/6rJsc19FqGvy5hhMZa0OPxXxCtZJWD7DwHQJGM3ZwZ1DWoek1nkr0SML 6DIVIo5yXB3TUUhxu7UftVLKh3LLVkTOiqSt7Lun97UlhRjr5JAVjtojFU/4DiUEgpyQAC 0GBNmFBVaV7+swBk2GtNVXQlzIpmfEqD9iCcZYw18RgCNzR459kj8KBtBiunsQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 9 Jun 2024 17:47:43 +0200 Message-ID: <20240609154746.4173264-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240609154746.4173264-1-michael@niedermayer.cc> References: <20240609154746.4173264-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 3/6] avutil/hwcontext_d3d11va: correct sizeof IDirect3DSurface9 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: nxZnr81ancXy Fixes: CID1591944 Wrong sizeof argument Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavutil/hwcontext_dxva2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/hwcontext_dxva2.c b/libavutil/hwcontext_dxva2.c index 03cb739a7f2..0b76966ebfb 100644 --- a/libavutil/hwcontext_dxva2.c +++ b/libavutil/hwcontext_dxva2.c @@ -147,7 +147,7 @@ static AVBufferRef *dxva2_pool_alloc(void *opaque, size_t size) if (s->nb_surfaces_used < hwctx->nb_surfaces) { s->nb_surfaces_used++; return av_buffer_create((uint8_t*)s->surfaces_internal[s->nb_surfaces_used - 1], - sizeof(*hwctx->surfaces), dxva2_pool_release_dummy, 0, 0); + sizeof(**hwctx->surfaces), dxva2_pool_release_dummy, 0, 0); } return NULL; From patchwork Sun Jun 9 15:47:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 49754 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:c209:0:b0:460:55fa:d5ed with SMTP id d9csp2068931vqo; Sun, 9 Jun 2024 08:48:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXvgv+uK2Q2fCV4RrWU1Xg8Vr3Imp16/4NPMDtxMoWCiRfF0FMetd72SYNphglkDDyhDDuiKYVSJ0dOeNoLFjQnjO9HOLmv51MJ9w== X-Google-Smtp-Source: AGHT+IH7NuTXoOmWexQ6pjKmW+E8fX4lAozXkbEnDk7vPIP4BZ04gb3weoYzOPo+zpSkrBQ2tTVY X-Received: by 2002:a50:99d0:0:b0:57c:74fb:6e37 with SMTP id 4fb4d7f45d1cf-57c74fb6ee2mr1322121a12.4.1717948106992; Sun, 09 Jun 2024 08:48:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717948106; cv=none; d=google.com; s=arc-20160816; b=h1E9712iu007RmqIUfMjgr+JRcPZ7wkYxt19qlRYlngaWpD63Jg6rUzMXzeBq4nSsm 6AVkHJWS85ulNj13UN0SKbyvnlcdlJqjPtWa8EWRfuna7LIwtHFB6ku8zi56GZHVj65i 10E/PKgCcS7KJtl4InWlshZJBWSDYS7rsVAqGEw76RBuE+NA8woIeQtlSS9VPTVmL48n i6kMa88mlmRjB9Ro43bXSTehsgsOdO/adNZwXzqa05YO/itlPhGfbVOl9VIQnlEx+OTO EaDO4BFrQgzvY2QaFI6gSiItJeh/YaZ+B2lJAttcTyj5POcvgjVPN3gqUanz9xq4bVMv 1/nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=rqbswjrJIcm3mGsSCmYdmwKDT54EWiPDpVIqK4IqhdE=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=l1gwrzYD4X83X886AXpuchxdSw7YvojawGmJbvq1hZIlcwWUGQq7eACAIf8qrsCAE6 SN48vco6kUwGKzSSsWG+p1XjuPvLRTvkfT3g43wBqnFskTxx1Ny8sUssEV/tMXCsVBWo /VopJhD01xdCtxs+swCp6B7E/icu3jqV286w+hYgeJ22nSGiGGvi10v5z9KjwZlZ/vYb Z8LtdxjD4MNavaV9Bx1nAr0yZj/5YAbE/eaY8jBlMm256DCe7mgIMhshJ2f+ue+/z2bf KiJoPByPcnYqs7viWJvgKnm5MlCQDqVrUgHdbadBkYETiX3Wxl/uHo8MKdZB7B96AxPc hfkg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=YCNYw49a; 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 4fb4d7f45d1cf-57aae2321b4si3971382a12.431.2024.06.09.08.48.26; Sun, 09 Jun 2024 08:48:26 -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=@niedermayer.cc header.s=gm1 header.b=YCNYw49a; 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 B8E5468D5D2; Sun, 9 Jun 2024 18:48:00 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 61BED68D5D2 for ; Sun, 9 Jun 2024 18:47:51 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id B539040003 for ; Sun, 9 Jun 2024 15:47:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1717948070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TzlNNp7FGGNYmtwBNYLPSb2DCmPAgeVnDwPdbjZ/59M=; b=YCNYw49aP2KxRwhqvEyzTcUXZ5ovKwNKfrlEnJxeBldwmW3RZVd3hSZSGrUVG47dpSFeyc JVejyP5TF96WxnCFIEbssHVdOcPq8mR6oO2nfdS1OFTKSPtFg4yYiVVnKsjAdNWmopW7IC AGL8XBMyEbwAu64hRRHw5OYCfYf525pQ1Vz40TVNsv16gJE5UcuQRcvrdzwU2Ogx/Owi+G FwrTqeTPyZRjSFMZvmy6vvo+zw88/LQ+C2Ginptjc1fjKIibCqZy2zRk/2itxVwWoDfRht T48cHxzyU3I3Je8dVAniuEY5v1Yqe2zJxno+O1qom/usYZh4JsgZdgsJBjULXg== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 9 Jun 2024 17:47:44 +0200 Message-ID: <20240609154746.4173264-4-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240609154746.4173264-1-michael@niedermayer.cc> References: <20240609154746.4173264-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 4/6] avutil/wchar_filename: Correct sizeof 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 2g5JZmGKpg7i Fixes: CID1591930 Wrong sizeof argument Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavutil/wchar_filename.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/wchar_filename.h b/libavutil/wchar_filename.h index 868a30b5325..23cc92aa2d7 100644 --- a/libavutil/wchar_filename.h +++ b/libavutil/wchar_filename.h @@ -57,7 +57,7 @@ static inline int wchartocp(unsigned int code_page, const wchar_t *filename_w, errno = EINVAL; return -1; } - *filename = (char*)av_malloc_array(num_chars, sizeof *filename); + *filename = av_malloc_array(num_chars, sizeof **filename); if (!*filename) { errno = ENOMEM; return -1; From patchwork Sun Jun 9 15:47:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 49755 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:c209:0:b0:460:55fa:d5ed with SMTP id d9csp2068989vqo; Sun, 9 Jun 2024 08:48:36 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWbtVU4yHQyjGeBi6o6jvU/ZTWcEF/uOyT288cRh49I5e9Xv5UefWhFm1RkNjI9F7yQeGgh8rACXxO1n/tHiLAAO0hCVbIVnpVY6A== X-Google-Smtp-Source: AGHT+IFY/UvVgt+7k7YqryQnkVAIdlUasJR9CgzuToVgUnU02gQ0sOik60ofWcumYZGyUp0K5DdX X-Received: by 2002:a17:907:76d8:b0:a6d:fb80:cbb1 with SMTP id a640c23a62f3a-a6dfb80cc85mr394959566b.60.1717948116655; Sun, 09 Jun 2024 08:48:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717948116; cv=none; d=google.com; s=arc-20160816; b=Nu9axGLWRpqrR+Fdu/xU+Tvwjb6L49u/sTb5OYCzLkoEbpguIh/cJlkmlnnRq0UWH1 Ir9wiPFMth8ABz5CtnyCFnACwxaBYCZJD0fzfRKgdMm3C95T6p/EVzn7jxpl09jPNeWe yv/CPBRjNBspSbPBnYUe4gG72teg93nAjqYW2YDBR7p2B+uhsPgNorZtGHWrnZgpHoYu kom8qKCoVhgnDsN3qltStpD0Gm6wFY+1o56puN70Inu6prvcRMSn4mRCEcuAP2vFiiM6 okN4Dqhh0ICAFhqL0p52aQadPZbfHJC/XViyDkI5A29yhiXULqoA/S7h5ErDmGzp012B AKYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=0NCB1j1Z6vpci6hGP6i7XZRxrk4uFOovJuSaphfVDbw=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=SyJuuwoTmesJep0qsOioOFvvu7/g+EMoo5mImw23RDLKDH7RtcpbHwrVLjAVeQSsbS E373vUmT4Xx9cN11t3r0NlmXjyuzkgbagF2cOKxvRfu4BJa2vOnvClEIl75Yq5ge3Vbb wZ23Jyz5j4sMDalcQHsSUNeQoBF3SDky9EcHZbV3SZ7jxMKrZEx0PKxp8rDoY0GKZUUc agmWQTouyGn4CNE4VgoYq8C4lENl8tDPSOfxa16mu1YanmHu2ZrRbwy3bHq3dmUxyhof ouXM/yt9lNd4KxPuRhFgfqKGge5LbXMY9++EhZMfObagxVouGqmxyTd9f2lf6nx0blJw gGPg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b="U/kYDwi9"; 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 a640c23a62f3a-a6eff8a389bsi168068566b.144.2024.06.09.08.48.35; Sun, 09 Jun 2024 08:48:36 -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=@niedermayer.cc header.s=gm1 header.b="U/kYDwi9"; 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 03F2F68D63B; Sun, 9 Jun 2024 18:48:02 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 24B4268D59D for ; Sun, 9 Jun 2024 18:47:52 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 82190240004 for ; Sun, 9 Jun 2024 15:47:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1717948071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YwuBRNnaqYA7k5bGrar+c9zj2cQjplHR6LhtggzjFeU=; b=U/kYDwi99mYyE0YMW+euFheDTtAu61uIUO6Ekm1z4sNJtX3fcWjp5EzkMSh7JexL9ax7ot MThyTq7ODVmMFnZFmXQNVrGGmiPIzQ0xjpcSXln7lWvvOFiY5NvOObS03xgwX0818XcetC WkVlfktxkdv9VCbSky/KkGCKNClXdpqaRnuFd33bTIYagKNuWFjrAym1Q2Exp8SR0kPi9A Xpp+PxqcPnqTUPywvdBaRAjmT1UJU03ptyaT8GHJ0Pgysu2MYwmWMSB54x/THX2LQdL39N a8tk4ukYr6XuNKu0vI06Qn0Hm96YHFbt6ul5/4nD2LSg6eZe+EzghaBSHWffFQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 9 Jun 2024 17:47:45 +0200 Message-ID: <20240609154746.4173264-5-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240609154746.4173264-1-michael@niedermayer.cc> References: <20240609154746.4173264-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 5/6] swscale/swscale: Use ptrdiff_t for linesize computations 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Rhm0vRLR+mzJ This is unlikely to make a difference Fixes: CID1591896 Unintentional integer overflow Fixes: CID1591901 Unintentional integer overflow Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libswscale/swscale.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 2795429b6c3..7fb24ee04bb 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -1173,7 +1173,7 @@ int sws_receive_slice(struct SwsContext *c, unsigned int slice_start, } for (int i = 0; i < FF_ARRAY_ELEMS(dst); i++) { - ptrdiff_t offset = c->frame_dst->linesize[i] * (slice_start >> c->chrDstVSubSample); + ptrdiff_t offset = c->frame_dst->linesize[i] * (ptrdiff_t)(slice_start >> c->chrDstVSubSample); dst[i] = FF_PTR_ADD(c->frame_dst->data[i], offset); } @@ -1234,7 +1234,7 @@ void ff_sws_slice_worker(void *priv, int jobnr, int threadnr, for (int i = 0; i < FF_ARRAY_ELEMS(dst) && parent->frame_dst->data[i]; i++) { const int vshift = (i == 1 || i == 2) ? c->chrDstVSubSample : 0; const ptrdiff_t offset = parent->frame_dst->linesize[i] * - ((slice_start + parent->dst_slice_start) >> vshift); + (ptrdiff_t)((slice_start + parent->dst_slice_start) >> vshift); dst[i] = parent->frame_dst->data[i] + offset; } From patchwork Sun Jun 9 15:47:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 49756 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:c209:0:b0:460:55fa:d5ed with SMTP id d9csp2069033vqo; Sun, 9 Jun 2024 08:48:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVueZ4BlMZ1Sn+W56uLWWg2qOdo3Ygy5MxFESoWBitV+Dkk12JZAXhTVJOrV2ZA073Yg1N8/cHZFo3XyJLz/vX+xyQ10ByeFYWrJA== X-Google-Smtp-Source: AGHT+IEjvYeoGMRoK9ql1ROeZKhcDGUSnBkvwGLD0LOaKTipl+a8euQwZopiXdIl4h/e9EbQK2WF X-Received: by 2002:a50:999d:0:b0:57c:6ae2:abda with SMTP id 4fb4d7f45d1cf-57c6ae2ac5emr3089458a12.5.1717948125459; Sun, 09 Jun 2024 08:48:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717948125; cv=none; d=google.com; s=arc-20160816; b=i/bPt1tEF3ve5ThZCRoP7eW1Y9xC4fccAIPy5yHViBsTAqDYY5jlFLHCNf0BMzmS0J CtDbSbVhSv1jN6tJMlze/xWDQZljXs9ZLvbmvprQNqZsZqfXL24Wxdm8SW9K14WBzzt3 mqpGs97Ee686FB6nutocGbhmsMkYwmgD2jspnQQoCiMXv0/9qxOO6zb0xhv0jt3VZyfk gpiwd3glbOso0e0lnwuBk/gcVy3VznK+70RcnMF/v1hVALj/zlDcCoeBhVmEoHNKZfbw +s1rOzNRGOduTNai4CGnp2K0Z6Z1drwknhFCQup3605UraMigVYonVKjEgBDNP/F6re5 chrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=mdeNEI8jQ/dzyjAEciFlTXqUZII+x4cNw4RGg2RnqyE=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=eQcP1l/F09aaW++cjq9rHtZrB7ZZ7PzRH6NRzJAZhX/noEYV98GYq+Kpt/7w28nuyl Pv+zjMR3AEYYGvm+Ur/3daPsdOYy5MAW8mnJIhL2FG06fjZx3aHrUSj2ZQ70fc/9mEZX Fb3ya8jn/krj7ki1uGndALSeBNaYxC04W26YMFeFvgmCI95K2+4goH0u52bAs/fBLu0j qYoGBY9hf0NxjIHIP23GtCJh40kKehU23b4WY/CQ+ErMY+Lw8vJNvsDQrX3XY1/IrDaP nDlXUdfNEThqm+4chZ11NwZGQuKriLYNjof9psW4qNUKK/Vucwf/WYKwKFtiUwVrPEw7 h2uw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=JcQ7jhXj; 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 4fb4d7f45d1cf-57c770e970csi714303a12.207.2024.06.09.08.48.44; Sun, 09 Jun 2024 08:48:45 -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=@niedermayer.cc header.s=gm1 header.b=JcQ7jhXj; 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 4053468D647; Sun, 9 Jun 2024 18:48:03 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D110768D5F1 for ; Sun, 9 Jun 2024 18:47:52 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 3F513E0005 for ; Sun, 9 Jun 2024 15:47:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1717948072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6XQxeV1rGH2PJDPR2jT8IO2rQbOPlLtQQJVkapkkyS4=; b=JcQ7jhXjZoz8yMDs/SvxO17Z0wy2/+u0P9oEVEYzXnvJ61o9TzeqIkbTTzPWi+wGVysQrV nUXf8zPZxLR/XdBZ6ClCyM5MP5JTdYyVYcA7Ff+l71Zi9X2mQbguioIDL0b1Sp7pMAIshQ S+6rxgu9WQDOPhzs6e4daGAKHb+jgGzHkrg6Cv+esE7z730IibS/ACo2FhIpG+aJyXR/MB qvuSHosIQRJN0ax/IaBXLVRMfFNRiCMKe3yrgsfiQ16gYzZPvLgC8JDHekTgfYWfHHZlst JgDqHFjBO6qj+pu3csxw33E3jFdXfaUeJdftWS4NHxByWHqvM44Y9cCQOv/tOA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 9 Jun 2024 17:47:46 +0200 Message-ID: <20240609154746.4173264-6-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240609154746.4173264-1-michael@niedermayer.cc> References: <20240609154746.4173264-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 6/6] avfilter/af_aderivative: Free out 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: um8bczSS5puC Fixes: CID1197065 Resource leak Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavfilter/af_aderivative.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/af_aderivative.c b/libavfilter/af_aderivative.c index eeaa23ff88d..4883972dcf1 100644 --- a/libavfilter/af_aderivative.c +++ b/libavfilter/af_aderivative.c @@ -126,6 +126,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) s->prev = ff_get_audio_buffer(inlink, 1); if (!s->prev) { av_frame_free(&in); + av_frame_free(&out); return AVERROR(ENOMEM); } }