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 A40E0487E4 for ; Sat, 18 May 2024 03:58:15 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E8D7868D28C; Sat, 18 May 2024 06:57:55 +0300 (EEST) 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 8119168CED8 for ; Sat, 18 May 2024 06:57:47 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id AA146240003 for ; Sat, 18 May 2024 03:57:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1716004666; 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=T5eR8UvAcPr5sPbvVt/HJsD73WJ1JzfAwpJMvt2iyLg=; b=pyp858EHYn7B9iHYIkv5As4a2VhUnqV3/Ci3es91v7xhSFWVMCsmuXoK1DbBFtAN8XzNHG UdAgm3kA5BCU6fWqxagcrN65kqwMzEUADvkoXl92s35tQM2keQQZbvtN5nuYF545ZIHIH3 ypBibAWCvEDskf6gXUuM4bsWfQd9C2U/Y7V9iams/1rclGAof0FR4Ou4ZkSWeRchZyLU8C o2ZoYNu68TA5uZkNb6hGuMK7sJRYm3TEqzrlfC5oxrK+0hjwGYJwITbQYdCl2in6JSFIW8 poywkygkwFDzORJk0ptyGSkFMLwJPPwklEvgAyspLbjavODaKFuI5G6T2qxKSg== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 18 May 2024 05:57:37 +0200 Message-ID: <20240518035743.766552-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240518035743.766552-1-michael@niedermayer.cc> References: <20240518035743.766552-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 3/9] avcodec/vble: Check av_image_get_buffer_size() for 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: Fixes: CID1461482 Improper use of negative value Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/vble.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/vble.c b/libavcodec/vble.c index 32157913c77..c585b1ed9fc 100644 --- a/libavcodec/vble.c +++ b/libavcodec/vble.c @@ -191,6 +191,9 @@ static av_cold int vble_decode_init(AVCodecContext *avctx) ctx->size = av_image_get_buffer_size(avctx->pix_fmt, avctx->width, avctx->height, 1); + if (ctx->size < 0) + return ctx->size; + ctx->val = av_malloc_array(ctx->size, sizeof(*ctx->val)); if (!ctx->val) { -- 2.45.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".