mirror of
https://github.com/X11Libre/xf86-input-mouse.git
synced 2026-03-24 01:24:06 +00:00
Do not return the address of a local buffer
Make the const buffer returned by FindDevice a static const buffer, to avoid letting be on the stack. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
This commit is contained in:
@@ -171,7 +171,7 @@ OsMousePreInit(InputInfoPtr pInfo, const char *protocol, int flags)
|
||||
static const char *
|
||||
FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
|
||||
{
|
||||
const char path[] = DEFAULT_MOUSE_DEV;
|
||||
static const char path[] = DEFAULT_MOUSE_DEV;
|
||||
int fd;
|
||||
|
||||
SYSCALL (fd = open(path, O_RDWR | O_NONBLOCK | O_EXCL));
|
||||
|
||||
Reference in New Issue
Block a user