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 35E764B549 for ; Fri, 7 Jun 2024 23:18:42 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0525068D86A; Sat, 8 Jun 2024 02:18:15 +0300 (EEST) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2795368D860 for ; Sat, 8 Jun 2024 02:18:08 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 7D657C0002 for ; Fri, 7 Jun 2024 23:18:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1717802287; 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=xdjtL39rULRiz7Ja9srt2abm1fIS9IP1mJMz8DWwpfk=; b=UVvFpdfQRV4+ghmMrRj3V2Ala+rnlw+Kf48M4vDWiv8XGL2ZnVKNdcZk3BVuvD1oznGILY hfaqTJmfODqSd1R3G1wFgTEQtntkDBYKCDjPIQcsGA67yJmQSD2VAoN72oIevWkL0LxOVa W4g7/5VW4EASKDiZVpcWbVcoVaxhYzeLn69SjYalB75S8QTJ7/IgHvONteEuIeQkuU0gH3 Pfy7Zx4KWioKlWXZxKqT+zM4v2fp4L3LagZ3bk9A9Y4Ud/YdxMT0eH0CWw8wdXA8k6xzwo 2sjdI3lF16hZf/08JjHDWvStVE28HDcYw/oPD5X0NtiWFxF+4dsetGmtok74QQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 8 Jun 2024 01:18:03 +0200 Message-ID: <20240607231803.3017607-4-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240607231803.3017607-1-michael@niedermayer.cc> References: <20240607231803.3017607-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 4/4] avformat/rtpenc_rfc4175: Use 64bit in computation if copy_offset 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: Found while reviewing: CID1494441 Untrusted value as argument Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavformat/rtpenc_rfc4175.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/rtpenc_rfc4175.c b/libavformat/rtpenc_rfc4175.c index 257d072cd31..2120274f014 100644 --- a/libavformat/rtpenc_rfc4175.c +++ b/libavformat/rtpenc_rfc4175.c @@ -116,7 +116,7 @@ void ff_rtp_send_raw_rfc4175(AVFormatContext *s1, const uint8_t *buf, int size, int l_field; int l_line; int l_off; - int copy_offset; + int64_t copy_offset; length = (headers[0] << 8) | headers[1]; l_field = (headers[2] & 0x80) >> 7; @@ -127,7 +127,7 @@ void ff_rtp_send_raw_rfc4175(AVFormatContext *s1, const uint8_t *buf, int size, if (interlaced) l_line = 2 * l_line + l_field; - copy_offset = (l_line * width + l_off) * pgroup / xinc; + copy_offset = (l_line * (int64_t)width + l_off) * pgroup / xinc; if (copy_offset + length > size) break; memcpy (dest, buf + copy_offset, length); -- 2.45.2 _______________________________________________ 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".