diff options
author | Thomas Haller <thaller@redhat.com> | 2017-05-17 16:45:46 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-05-19 09:46:08 +0200 |
commit | 9594ee6e6921c3e37615a572de7e986274a68500 (patch) | |
tree | a2afaf3121b5f1852b5d9f5f7cf9c9d6f347dace | |
parent | 41e7fca59762dc928c9d67b555b1409c3477b2b0 (diff) | |
download | NetworkManager-9594ee6e6921c3e37615a572de7e986274a68500.tar.gz |
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: 6808bf8195d427975638610781f8c5384228218d
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
-rw-r--r-- | shared/nm-utils/nm-udev-utils.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/shared/nm-utils/nm-udev-utils.c b/shared/nm-utils/nm-udev-utils.c index bf0ad5b931..1f1811cd9b 100644 --- a/shared/nm-utils/nm-udev-utils.c +++ b/shared/nm-utils/nm-udev-utils.c @@ -89,6 +89,7 @@ nm_udev_utils_property_decode (const char *uproperty, char **to_free) return uproperty; } + *n++ = '\0'; return (*to_free = unescaped); } |