mirror of
https://github.com/jtgans/g13gui.git
synced 2025-06-20 00:14:09 -04:00
g13d: Fix horribly broken strncpy usage
The sizeof was actually using the size of the statically allocated name instead of the size of the destination. In practice, it's not a problem, but still, it should be fixed.
This commit is contained in:
parent
ae055495cc
commit
19faa21256
@ -145,7 +145,7 @@ int g13_create_uinput(G13_Device *g13) {
|
||||
}
|
||||
memset(&uinp, 0, sizeof(uinp));
|
||||
char name[] = "G13";
|
||||
strncpy(uinp.name, name, sizeof(name));
|
||||
strncpy(uinp.name, name, sizeof(uinp.name));
|
||||
uinp.id.version = 1;
|
||||
uinp.id.bustype = BUS_USB;
|
||||
uinp.id.product = G13_PRODUCT_ID;
|
||||
|
Loading…
Reference in New Issue
Block a user