From: "Zoltán Böszörményi" <zboszor@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev,
"kernel test robot" <lkp@intel.com>,
zboszormenyi@sicom.com, "Zoltán Böszörményi" <zboszor@gmail.com>
Subject: [PATCH v2] egalax_ts_serial: Fix potential buffer overflow
Date: Mon, 4 Dec 2023 07:40:47 +0100 [thread overview]
Message-ID: <20231204064047.158514-1-zboszor@gmail.com> (raw)
In-Reply-To: <c825b030-1520-426e-a6ad-7df0c276b3ea@gmail.com>
Increase phys[] array size to 40 bytes to avoid
this warning:
CC [M] drivers/input/touchscreen/egalax_ts_serial.o
drivers/input/touchscreen/egalax_ts_serial.c: In function ‘egalax_connect’:
drivers/input/touchscreen/egalax_ts_serial.c:112:21: warning: ‘/input0’ directive output may be truncated writing 7 bytes into a region of size between 1 and 32 [-Wformat-truncation=]
112 | "%s/input0", serio->phys);
| ^~~~~~~
drivers/input/touchscreen/egalax_ts_serial.c:111:9: note: ‘snprintf’ output between 8 and 39 bytes into a destination of size 32
111 | snprintf(egalax->phys, sizeof(egalax->phys),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
112 | "%s/input0", serio->phys);
| ~~~~~~~~~~~~~~~~~~~~~~~~~
Update my old (defunct) email addresses in passing.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202311171716.uIQY5rT4-lkp@intel.com/
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
---
CREDITS | 3 ++-
drivers/input/touchscreen/egalax_ts_serial.c | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/CREDITS b/CREDITS
index f33a33fd2371..5efccb40d577 100644
--- a/CREDITS
+++ b/CREDITS
@@ -470,8 +470,9 @@ S: Montreal, Quebec
S: Canada
N: Zoltán Böszörményi
-E: zboszor@mail.externet.hu
+E: zboszor@gmail.com
D: MTRR emulation with Cyrix style ARR registers, Athlon MTRR support
+D: eGalax serial touchscreen support
N: John Boyd
E: boyd@cis.ohio-state.edu
diff --git a/drivers/input/touchscreen/egalax_ts_serial.c b/drivers/input/touchscreen/egalax_ts_serial.c
index 375922d3a6d1..390b3a670bfa 100644
--- a/drivers/input/touchscreen/egalax_ts_serial.c
+++ b/drivers/input/touchscreen/egalax_ts_serial.c
@@ -2,7 +2,7 @@
/*
* EETI Egalax serial touchscreen driver
*
- * Copyright (c) 2015 Zoltán Böszörményi <zboszor@pr.hu>
+ * Copyright (c) 2015 Zoltán Böszörményi <zboszor@gmail.com>
*
* based on the
*
@@ -42,7 +42,7 @@ struct egalax {
struct serio *serio;
int idx;
u8 data[EGALAX_FORMAT_MAX_LENGTH];
- char phys[32];
+ char phys[40];
};
static void egalax_process_data(struct egalax *egalax)
@@ -185,6 +185,6 @@ static struct serio_driver egalax_drv = {
};
module_serio_driver(egalax_drv);
-MODULE_AUTHOR("Zoltán Böszörményi <zboszor@pr.hu>");
+MODULE_AUTHOR("Zoltán Böszörményi <zboszor@gmail.com>");
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL v2");
--
2.43.0
prev parent reply other threads:[~2023-12-04 6:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-03 6:07 drivers/input/touchscreen/egalax_ts_serial.c:116:21: warning: '/input0' directive output may be truncated writing 7 bytes into a region of size between 1 and 32 kernel test robot
2023-12-03 6:23 ` Dmitry Torokhov
2023-12-03 9:06 ` [PATCH] egalax_ts_serial: Fix potential buffer overflow Zoltán Böszörményi
2023-12-03 18:35 ` Dmitry Torokhov
2023-12-04 6:38 ` Böszörményi Zoltán
2023-12-04 6:40 ` Zoltán Böszörményi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231204064047.158514-1-zboszor@gmail.com \
--to=zboszor@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=zboszormenyi@sicom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox