mirror of
https://github.com/X11Libre/xf86-input-synaptics.git
synced 2026-03-24 01:34:04 +00:00
eventcomm: fix possible buffer overflow
eventcomm.c: In function 'EventAutoDevProbe':
eventcomm.c:1045:32: warning: '%s' directive writing up to 255 bytes into a region of size 53 [-Wformat-overflow=]
1045 | sprintf(fname, "%s/%s", DEV_INPUT_EVENT, namelist[i]->d_name);
| ^~
eventcomm.c:1045:13: note: 'sprintf' output between 12 and 267 bytes into a destination of size 64
1045 | sprintf(fname, "%s/%s", DEV_INPUT_EVENT, namelist[i]->d_name);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-synaptics/-/merge_requests/15>
This commit is contained in:
committed by
Marge Bot
parent
373139dd06
commit
89900bcf4d
@@ -1033,7 +1033,7 @@ EventAutoDevProbe(InputInfoPtr pInfo, const char *device)
|
||||
}
|
||||
|
||||
while (i--) {
|
||||
char fname[64];
|
||||
char fname[PATH_MAX];
|
||||
int fd = -1;
|
||||
|
||||
if (!touchpad_found) {
|
||||
|
||||
Reference in New Issue
Block a user