From nobody Sat Apr 11 21:33:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=jablonski.xyz ARC-Seal: i=1; a=rsa-sha256; t=1773091380; cv=none; d=zohomail.com; s=zohoarc; b=iyQ53ue7ZfVyGxv9PbCBO5ELhYosyacdkx8argPmzGQd7F6bEbMB1vKwn8rKDdWWur0PkXbe3/9c+ARzpVLdGWPfqQsCIXrQSnG/16XgHnCvUpBcKwOO21iinydB0k3SxhsK7VrGafqWfz8VlP5iuVzMwYuJf9YAJCN+YAkKDOA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773091380; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=TDmxJd1n0lVxalC7XobRChArboi79ijwwEcsy0giF4o=; b=dFtSAe0/LWdAYqHL9jADH+/G2YH/NwsWW1YNMVpjPjPN16qiUyrxu37IpHCZJI1lDrZ4KP4Y3XYkwz4SBNGFEpNPolnTJfkO716mWKn44Ey1BPVhfKFDg+bL4Ws+YUwywAVomOzlEcgXdEbXrtdlfUj7iop8pAMczyf+KiWyXVQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773091379666996.9401967480874; Mon, 9 Mar 2026 14:22:59 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vzi3L-00038u-2x; Mon, 09 Mar 2026 17:22:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vzi3J-00037e-1L for qemu-devel@nongnu.org; Mon, 09 Mar 2026 17:22:13 -0400 Received: from fout-b7-smtp.messagingengine.com ([202.12.124.150]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vzi3H-0006V7-0i for qemu-devel@nongnu.org; Mon, 09 Mar 2026 17:22:12 -0400 Received: from phl-compute-08.internal (phl-compute-08.internal [10.202.2.48]) by mailfout.stl.internal (Postfix) with ESMTP id 788021D0003E; Mon, 9 Mar 2026 17:22:09 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-08.internal (MEProxy); Mon, 09 Mar 2026 17:22:09 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 9 Mar 2026 17:22:08 -0400 (EDT) Received: from localhost (chomposaur [local]) by chomposaur (OpenSMTPD) with ESMTPA id b52f5627; Mon, 9 Mar 2026 21:22:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jablonski.xyz; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to; s=fm3; t=1773091329; x=1773177729; bh=TDmxJd1n0l VxalC7XobRChArboi79ijwwEcsy0giF4o=; b=OttroM4hE6VljeaxhMVg61Romf rFW6CAPgmYawVemZh7nqfGZ2M+50YIeF6LHJYQlBzcRS3+QguxHhi6VhI5hZbhDo /G+VdDJByH6SrMdGxfueOrEJsJmHSsaJ+Ae7ApJwwoQ6HifGMA1ft/Wv9/Jt/Lh4 ay/+5+wxUsTEcCSZZQC2nvr2AAmEZvNppLUGpEm0jxRA/wdnmGZfX+3DMUTC7QJq edb8lRTqnJ+5QMTR4medYnUg1IR5EmYCIoyVV9ffDwEQAQHaYq/wpfesVv2UkLWW x/d/EUG6zBB92uSMEXyNxxnQamWXQhZnrBIrJpZiv9Lj3z1jOX9dfGBKzB8w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1773091329; x=1773177729; bh=TDmxJd1n0lVxalC7XobRChArboi79ijwwEc sy0giF4o=; b=o+UaMM0oAE86lfyu+mkWXUuHiYlatqeeozFYO+wNMm5T0M7v7Uk UPQRjf9JhrAzd32moaOjlC4xD0BE2psMJ09gX1Ql3MzRZbVm7UnQz3klg0L796We jY20guKNna11+SXKQIZ2LwCT9matinKpcJZMyIYLyj4ZdBOH2RFEwV8wu0CgIYGA TEhCWsxK4HjseE9i9CdID0QfCX+ao1rrjd26DLyNgxTGKzJFn2jq1Sc7pyLM1nO0 rOe1T6qkQKkzpSvDLM2tSrCmyvGToiVu64W0pFgU7MxSXMwAOTN12cDlGMcbGXCz 2hFwkHG2NSZnLpPLSlDV4b+cfin5ysqyEWQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvjeeludelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdljedtmdenucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecu hfhrohhmpeevhhgrugculfgrsghlohhnshhkihcuoegthhgrugesjhgrsghlohhnshhkih drgiihiieqnecuggftrfgrthhtvghrnhephfetuefgueejleetgefgieegveejleeggedu gfeuvdehgefhffduffeludekieevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheptghhrggusehjrggslhhonhhskhhirdighiiipdhnsggprhgt phhtthhopeegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegsrghlrghtohhnse gvihhkrdgsmhgvrdhhuhdprhgtphhtthhopehphhhilhhmugeslhhinhgrrhhordhorhhg pdhrtghpthhtohepqhgvmhhuqdguvghvvghlsehnohhnghhnuhdrohhrghdprhgtphhtth hopegthhgrugesjhgrsghlohhnshhkihdrgiihii X-ME-Proxy: Feedback-ID: ib26944c1:Fastmail From: Chad Jablonski To: qemu-devel@nongnu.org Cc: BALATON Zoltan , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Chad Jablonski Subject: [PATCH] ati-vga: Fix sign extension in DEFAULT_SC_BOTTOM_RIGHT read Date: Mon, 9 Mar 2026 17:22:06 -0400 Message-ID: <20260309212206.2457691-1-chad@jablonski.xyz> X-Mailer: git-send-email 2.52.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=202.12.124.150; envelope-from=chad@jablonski.xyz; helo=fout-b7-smtp.messagingengine.com X-Spam_score_int: 34 X-Spam_score: 3.4 X-Spam_bar: +++ X-Spam_report: (3.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.5, FROM_SUSPICIOUS_NTLD_FP=1.999, PDS_OTHER_BAD_TLD=1.999, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @jablonski.xyz) X-ZM-MESSAGEID: 1773091383323158500 Content-Type: text/plain; charset="utf-8" Cast default_sc_bottom to uint32_t before shifting left to prevent sign extension when assigning to uint64_t. Fixes: CID 1645615 Signed-off-by: Chad Jablonski --- hw/display/ati.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/ati.c b/hw/display/ati.c index 6cf243bcf9..f9773e1154 100644 --- a/hw/display/ati.c +++ b/hw/display/ati.c @@ -514,7 +514,7 @@ static uint64_t ati_mm_read(void *opaque, hwaddr addr, = unsigned int size) val |=3D s->regs.default_tile << 16; break; case DEFAULT_SC_BOTTOM_RIGHT: - val =3D (s->regs.default_sc_bottom << 16) | + val =3D ((uint32_t)s->regs.default_sc_bottom << 16) | s->regs.default_sc_right; break; case SC_TOP: --=20 2.52.0