From nobody Fri Apr 26 05:47:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1642626570723818.0810241254726; Wed, 19 Jan 2022 13:09:30 -0800 (PST) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 4E57716E3FAD; Wed, 19 Jan 2022 21:09:24 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id 8F4ED16E36DF for ; Wed, 19 Jan 2022 21:08:50 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by mailout11.t-online.de (Postfix) with SMTP id E3861111E; Wed, 19 Jan 2022 22:08:49 +0100 (CET) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1nAICH-04g6b30; Wed, 19 Jan 2022 22:08:49 +0100 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) id 52818200616; Wed, 19 Jan 2022 22:08:49 +0100 (CET) From: =?UTF-8?q?Volker=20R=C3=BCmelin?= To: seabios@seabios.org Date: Wed, 19 Jan 2022 22:08:49 +0100 Message-Id: <20220119210849.6196-1-vr_qemu@t-online.de> MIME-Version: 1.0 X-TOI-EXPURGATEID: 150726::1642626529-0000B7AB-44087609/0/0 CLEAN NORMAL X-TOI-MSGID: 0b7c1e80-85c0-4892-86de-dc0700b78f76 X-Spam-Level: * Message-ID-Hash: YLIGFPNGFKAAOLZXGZHTD6Y7JVZXWOTC X-Message-ID-Hash: YLIGFPNGFKAAOLZXGZHTD6Y7JVZXWOTC X-MailFrom: volker.ruemelin@t-online.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Gabe Black X-Mailman-Version: 3.3.5rc1 Precedence: list Subject: [SeaBIOS] [PATCH] sercon: add missing GET_LOW() to access rx_bytes List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: -- X-ZM-MESSAGEID: 1642626572378100001 The variable rx_bytes is marked VARLOW. Add a missing GET_LOW() to access rx_bytes. Reported-by: Gabe Black Signed-off-by: Volker R=C3=BCmelin --- src/sercon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sercon.c b/src/sercon.c index 66a1f24..a33dd08 100644 --- a/src/sercon.c +++ b/src/sercon.c @@ -641,7 +641,7 @@ sercon_check_event(void) while (inb(addr + SEROFF_LSR) & 0x01) { byte =3D inb(addr + SEROFF_DATA); if (GET_LOW(rx_bytes) < sizeof(rx_buf)) { - SET_LOW(rx_buf[rx_bytes], byte); + SET_LOW(rx_buf[GET_LOW(rx_bytes)], byte); SET_LOW(rx_bytes, GET_LOW(rx_bytes) + 1); count++; } --=20 2.31.1 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org