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:
@@ -89,6 +89,7 @@ nm_udev_utils_property_decode (const char *uproperty, char **to_free)
|
|||||||
return uproperty;
|
return uproperty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*n++ = '\0';
|
||||||
return (*to_free = unescaped);
|
return (*to_free = unescaped);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user