mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 07:30:10 +01: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:6808bf8195https://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 (cherry picked from commit9594ee6e69)
This commit is contained in:
parent
29c86eda62
commit
5eb11aa8ec
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