From patchwork Fri Aug 16 23:15:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 51050 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:b6ca:0:b0:48e:c0f8:d0de with SMTP id s10csp736255vqj; Fri, 16 Aug 2024 16:26:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU883OoDFuM5NlLgTIy5k/ufOapPhxcmqA6txVf9vn9oN6N9xxiZ8WW5EtgcH0DNL96u6XRxEAL9ORXnY11HI5Q34yjxcebtkGVwA== X-Google-Smtp-Source: AGHT+IEISBrounkXkNndj3EBk4bs6vgUQeHsaG49i3YpTfSvmZBWR9hxH/CPvgO4NVEL0gy/yLDZ X-Received: by 2002:a05:6512:3d04:b0:52f:c0dd:d168 with SMTP id 2adb3069b0e04-5331c6e53bfmr1546802e87.7.1723850777988; Fri, 16 Aug 2024 16:26:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723850777; cv=none; d=google.com; s=arc-20160816; b=HB+E22m1+3OoCIOyhNWzM0vnL8z0c8fbiWXhiuYypUs00bDXPuKvTyHszRbT+trNeE kO3txRoQu/0Tm6FoweaLw3EaYcEHd4xwt9zTipWTq2bQWbLt5QfrCUqN7dKXMtiEGX4u cfG0gHlqQCYSpytjLu4l3kfNqCjRD3sOE/KE/6CXLboaO8GE909RSOO+CKD9vrpaG8dJ tmZzq+u8/5x9X65bMKY+OK5HsJJFOVxHPnXlmQ/S9a8q/TRHfYcCx7Ni+uB2cRYOF8l1 N4xObvEuVWIhVfCMduv6UAEt7+Rix/RYb2aLMVw1t4Azzzh013KppbtwcwPuJMz2d6RZ aWNw== 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=dblFvAkQcGVDXK7MY3xNlLdkc6xQoXPSd7Yn7TRYWP4=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=0BheGAN8lBJKBeuX16NpRdvYi9qpKjIcbo7cuID8CmHIuA5PrMi9ktsF6tqD9LoaE4 QH5cOm8y0REV/Mrs5SGcfsbqFcKBw/KYOh+g72G1WeLnLjzYaDOL5fOSjtjZ7YyWkilN tfgE1UnHaiVrH8wKwfHtexJh4sCkO9LRRtx0qYI4Mx0Wm75lf+THrj9sjXJ7CvLxjuVk +GIFQa0QzQuUrL65bEP6nLhu55vO5g2iPP2F1ITXXANWOwBykK20jx3+EJf+Iedru74R a2qhIRRJunfI/Ey+ls51QOuxN1iZJnZnUSuVmNNJ+KVW+xEX7UcQzNHI3WjV+prdOLVB 6K8A==; 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="e/CJgO7/"; 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 2adb3069b0e04-5330d3b63c0si1292835e87.159.2024.08.16.16.26.17; Fri, 16 Aug 2024 16:26:17 -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="e/CJgO7/"; 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 D8AA968DCD8; Sat, 17 Aug 2024 02:15:16 +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 982DC68DCCC for ; Sat, 17 Aug 2024 02:15:09 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 9A003E0005 for ; Fri, 16 Aug 2024 23:15:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1723850109; 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=fCQhz7h0Edc0FEMnIVFv9TvvGPLQk2wTLVIfaIvqD1E=; b=e/CJgO7/25CDtrihuBpq/5N/nbtLW76ice1w1/n7Ki6YVRvLDaRxY5KtJ4BpGLwr52fJhb 4DTy9HFJsn56vZEsBYa0wg8+6NBQyLAzRsU2eucBiYn0Jjy0P9PjMg+eqZ8k6g0Zu4Cd7L PAWr+FHYPNIEE0JT9tAZTb55TZtNHYSJGQZAVFTV2eoHwNrVO39U+o9kCDUnJpHxTzhaCI ts/Tu3uOMUJL+KcSpcT3Lj7/I1swfcn3dyvm8JP9PN/D2tBeF4tP5A9JO85H+Q7H+6Ki6y UcAyDTT/SXApKoInbAweHCOE5PuOem12vdreNlC1/qh8bk2C6GSMKWLYkGtAoA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 17 Aug 2024 01:15:04 +0200 Message-ID: <20240816231504.3166080-5-michael@niedermayer.cc> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240816231504.3166080-1-michael@niedermayer.cc> References: <20240816231504.3166080-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 5/5] avcodec/hevc/ps: use unsigned shift 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: fF7iiVoB5kjW Fixes: left shift of 1 by 31 places cannot be represented in type 'int' Fixes: 70726/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-6149928703819776 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/hevc/ps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/hevc/ps.c b/libavcodec/hevc/ps.c index 80ac35a7dbf..cd5ece72b0a 100644 --- a/libavcodec/hevc/ps.c +++ b/libavcodec/hevc/ps.c @@ -1101,7 +1101,7 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, sps->used_by_curr_pic_lt = 0; for (i = 0; i < sps->num_long_term_ref_pics_sps; i++) { sps->lt_ref_pic_poc_lsb_sps[i] = get_bits(gb, sps->log2_max_poc_lsb); - sps->used_by_curr_pic_lt |= get_bits1(gb) * (1 << i); + sps->used_by_curr_pic_lt |= get_bits1(gb) * (1U << i); } }