mirror of
https://github.com/X11Libre/xf86-input-synaptics.git
synced 2026-03-24 01:34:04 +00:00
Use snprintf instead of sprintf
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-synaptics/-/merge_requests/20>
This commit is contained in:
@@ -1040,7 +1040,8 @@ EventAutoDevProbe(InputInfoPtr pInfo, const char *device)
|
||||
int rc;
|
||||
struct libevdev *evdev;
|
||||
|
||||
sprintf(fname, "%s/%s", DEV_INPUT_EVENT, namelist[i]->d_name);
|
||||
snprintf(fname, sizeof(fname), "%s/%s",
|
||||
DEV_INPUT_EVENT, namelist[i]->d_name);
|
||||
SYSCALL(fd = open(fname, O_RDONLY));
|
||||
if (fd < 0)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user