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 7D0C84659F for ; Wed, 21 Jun 2023 20:47:26 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2568568C047; Wed, 21 Jun 2023 23:47:08 +0300 (EEST) Received: from mail-ot1-f54.google.com (mail-ot1-f54.google.com [209.85.210.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E379F68AEC5 for ; Wed, 21 Jun 2023 23:47:01 +0300 (EEST) Received: by mail-ot1-f54.google.com with SMTP id 46e09a7af769-6b586e564fcso2919508a34.1 for ; Wed, 21 Jun 2023 13:47:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687380420; x=1689972420; 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=6evYh0a3oFhV+uMbD5tDoT81QT80ijgThONEqf11erk=; b=szNYkwpPvbkHb+z21b+k5khMLl4cblL3MPZbfrV+HFQd/uCwWwqCxHrJBgTBG0VnLl L1YEREGYl/59YdgUtJx4GWIpBHI2R3vrAiYxmQTP5sGvpHWQe0JPQcr1dAFmqAcn5Zch ys94H5JFC2C7VzcJB3WfBYg04px+hsjQcgJD3Gp66RmVYZi1OpfD17uElLRZ6Dv3fJsJ 48jD/klonlaypIXY1FKdR1+xcX4xU1OwCMavE9ov7fqHibxJXn6kOU91Z6NU+P/v8LJQ vTzCNEj4ZHTcYFNd9Joguxs7rONO3XtPnJK6yizG6vvZ/MGRD3XNodK5eUiTu8cHqhID Marg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687380420; x=1689972420; 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=6evYh0a3oFhV+uMbD5tDoT81QT80ijgThONEqf11erk=; b=HB2myFZvuBJZm393DTXZysENk1FA66EmIvXpvdiy6G83soCUAN/v/U7Cy/dcWmZg7L IwRjV1EexJqXtZ9gwk14FbLFZgBGxzL6OhHFh/3Yi0cwQbGBl87WFaP7elw8/W2h2oV1 rR/KgE0i8d4oT4vdw6a6aPmPdFFFM5WCjzpQ8q21MhIBRyhfKADaMp4GV0sE1z0cEKBL FKAZFRYRuiPTB3C8ZPTxLhhZ9XaiuuJHlI2l7+o1lZZ9zxoI7gImR0NUl5iavL6IWYpQ 3kLTzaYdyaPfOG7gLPXEdyGjzrSUSQ4+zWQ8VE04ZvLDXDESKNH78QIdhhrywhfDBNEc hbPA== X-Gm-Message-State: AC+VfDwLMX16v5U8EJniYXo6pEvOjPPMEPnPtajbF50L/4UE/pl0Eev+ UcP4MMBYQcuTUVNNqF6hTf4Pf9wVOAU= X-Google-Smtp-Source: ACHHUZ5NR49KVUAy2URdHJ91gQUAXEB39y+abFFgdLPZWNjCcauI5SdR/BAJahw9qpDMQKexvuR2pA== X-Received: by 2002:a05:6830:4790:b0:6aa:ef9c:cb80 with SMTP id df16-20020a056830479000b006aaef9ccb80mr13850956otb.33.1687380420155; Wed, 21 Jun 2023 13:47:00 -0700 (PDT) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id n14-20020a9d740e000000b006af9405773dsm2264737otk.35.2023.06.21.13.46.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 13:46:59 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 21 Jun 2023 17:46:58 -0300 Message-ID: <20230621204658.2742-3-jamrial@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230621204658.2742-1-jamrial@gmail.com> References: <20230621204658.2742-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/3] avformat: use AV_PKT_MAX_PAYLOAD_SIZE 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: Signed-off-by: James Almer --- libavformat/4xm.c | 2 +- libavformat/flac_picture.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/4xm.c b/libavformat/4xm.c index fdf6e4b84b..1a35299254 100644 --- a/libavformat/4xm.c +++ b/libavformat/4xm.c @@ -328,7 +328,7 @@ static int fourxm_read_packet(AVFormatContext *s, case cfr2_TAG: /* allocate 8 more bytes than 'size' to account for fourcc * and size */ - if (size > INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE - 8) + if (size > AV_PKT_MAX_PAYLOAD_SIZE - 8) return AVERROR_INVALIDDATA; if (fourxm->video_stream_index < 0) return AVERROR_INVALIDDATA; diff --git a/libavformat/flac_picture.c b/libavformat/flac_picture.c index b33fee75b4..16a053c6ea 100644 --- a/libavformat/flac_picture.c +++ b/libavformat/flac_picture.c @@ -120,7 +120,7 @@ int ff_flac_parse_picture(AVFormatContext *s, uint8_t **bufp, int buf_size, left = bytestream2_get_bytes_left(&g); if (len <= 0 || len > left) { - if (len > MAX_TRUNC_PICTURE_SIZE || len >= INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE) { + if (len > MAX_TRUNC_PICTURE_SIZE || len >= AV_PKT_MAX_PAYLOAD_SIZE) { av_log(s, AV_LOG_ERROR, "Attached picture metadata block too big %u\n", len); if (s->error_recognition & AV_EF_EXPLODE) return AVERROR_INVALIDDATA; -- 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".