mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 22:48:01 +02:00
libnm: fix unterminated NUL string when parsing UDev properties
This can result in trailing garbage (which fails UTF-8 validation
checks) or even worse, in read-out-of-bounds.
Fixes: 6808bf8195
https://bugzilla.redhat.com/show_bug.cgi?id=1443114
https://bugzilla.redhat.com/show_bug.cgi?id=1451160
https://bugzilla.redhat.com/show_bug.cgi?id=1451286
This commit is contained in:
parent
41e7fca597
commit
9594ee6e69
1 changed files with 1 additions and 0 deletions
|
|
@ -89,6 +89,7 @@ nm_udev_utils_property_decode (const char *uproperty, char **to_free)
|
|||
return uproperty;
|
||||
}
|
||||
|
||||
*n++ = '\0';
|
||||
return (*to_free = unescaped);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue