From patchwork Tue Jun 18 13:48:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 49997 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9196:0:b0:460:55fa:d5ed with SMTP id s22csp2569843vqg; Tue, 18 Jun 2024 06:49:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUBoRF9+LSMbTqNjxi90OHQj9o0z+BWY8QJiyXFslu2tGCVQW/j7PcjD8qCXe7nsCNayFhddVvL27epxMUP2Re9EIvfAIdPUI3DyQ== X-Google-Smtp-Source: AGHT+IHFnd2PoMdLLepVRLFUVaegfsMX+S1QgOlUsogHOFtM6wYZ1+abxko/6JF4wu/XVRGRKvJQ X-Received: by 2002:a17:906:259a:b0:a6f:4b7d:5994 with SMTP id a640c23a62f3a-a6f60df13admr685634466b.7.1718718579233; Tue, 18 Jun 2024 06:49:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718718579; cv=none; d=google.com; s=arc-20160816; b=lrQGV8vVKY87p+Lh1nQkWaB8uIVfCqJ0ZCvEiNAkN8vwcxAJpy+EbJKTe6iZHuTkyv 6MLuPC0jqLtCVp6WyRLUOEbZCDMRczJDRcPsJIbX9HlJ7zb053GOr1gVbO/ALtzUofHq 0htRogOAm7pBE1D2U2H2snEOzqNvg/n47QAQyzFM/VZJgGw3/StHMZScE9Zw7AeHVMSE OUfBZbeGFNgL6fAIvRPDJL6pF1qBCR0Kv+glWXPOjzmVYzzx931dGiiQrHTZC8Hu0nbJ 7vrvmjtbUxTw+lm++FBNDl3303AZlQWLXxHMBfmMt2zb/NAp+1Np2n8jWTX13Tf+OB8T uHMA== 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=oAevSvDTDFREte9hsPHZRUXqvbfHGiHwGPVVJIKuu2E=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=FGLi1tLd49SMnxIwJCXO7x6Ik+hPXR7e7g5DGUHG1kfXYrKlrDc2KtsA3emzjI9aRW QgWjJMLBuM4hM8Duve7CzyI/UPKPd3lBnzHXTqqCPChKo/FGK8kysyBM3P74ZKE6F+ob HWkiEBcOFt7WE3prKsaz6aAM9rePlgiia0e84ZTlp2jvVj0o1dN3CPN2RFUQfH8Sq4KL 7y3RJdodAxoyID7W3AQ3L+sesSkbf5eX0q48M12dJWn91u0Dv0S+RsgX5Ml2p4g1cC3O yBOC0WO6XMCDNyHxRPma+WCzy/tEMBnqtFTT4tBcLiFXv6GaKaLNpByzxuhZG4cm6BSz Fr7Q==; 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=BfGgjz2J; 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-a6f56dd63b2si511114466b.443.2024.06.18.06.49.38; Tue, 18 Jun 2024 06:49:39 -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=BfGgjz2J; 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 E0F2868D7ED; Tue, 18 Jun 2024 16:48:44 +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 0ED2D68D7CA for ; Tue, 18 Jun 2024 16:48:34 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 7369E240008 for ; Tue, 18 Jun 2024 13:48:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1718718513; 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=T369jEnMEzDITyJsoKyE0c/ZWEF+Ut2Zy/vvT2Y07zI=; b=BfGgjz2JxPg7d5Ld6vmZ51rUTGNdDSjbqxZihfzKf/VsLhL+RRLDHNhYeN1Yh1pVYQBQzr OROq9pQXDIQsbO8+FhOqKn6W9id9WQXaoeSxVCxVq/Gn641GE4a9uiRTJ9YHYedDOHhLiS btFbbE/C3M2hH6re6TsIrTTA4qdUPkeIuNru1kltJId5JRneVMEv0lrkbXXyfy4+03Zh/3 bykpEIdJgduZka853MDdh0DFnpsRl9xWZPmjfDHslc1ngbdr03UedCCQyykLOvu46Tv04u F41i/vhJqvPuCw0A0f+IoRJnEy5hWH066+BuDCmjfqR6/eC+sfvMH3733Eq47g== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 18 Jun 2024 15:48:26 +0200 Message-ID: <20240618134826.2189719-7-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240618134826.2189719-1-michael@niedermayer.cc> References: <20240618134826.2189719-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 7/7] avcodec/proresenc_kostya: use unsigned alpha for rotation 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: SQOBpGV0/pwt Fixes: left shift of negative value -208 Fixes: 69073/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PRORES_KS_fuzzer-4745020002336768 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/proresenc_kostya.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index 8b91ca1a98a..fe8cc5f0fda 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -343,7 +343,7 @@ static void get_slice_data(ProresContext *ctx, const uint16_t *src, static void get_alpha_data(ProresContext *ctx, const uint16_t *src, ptrdiff_t linesize, int x, int y, int w, int h, - int16_t *blocks, int mbs_per_slice, int abits) + uint16_t *blocks, int mbs_per_slice, int abits) { const int slice_width = 16 * mbs_per_slice; int i, j, copy_w, copy_h;