mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-02 21:40:10 +01:00
kinput: allocate enough space for null character.
This code wasn't allocating enough space and was assigning the NULL
one past the end.
Pointed out by coverity.
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 531785dd74)
This commit is contained in:
parent
3a2b67577c
commit
af8ffefc07
1 changed files with 1 additions and 1 deletions
|
|
@ -1055,7 +1055,7 @@ KdGetOptions(InputOption **options, char *string)
|
|||
|
||||
if (strchr(string, '=')) {
|
||||
tam_key = (strchr(string, '=') - string);
|
||||
key = strndup(string, tam_key);
|
||||
key = strndup(string, tam_key + 1);
|
||||
if (!key)
|
||||
goto out;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue