mirror of
https://github.com/systemd/systemd.git
synced 2025-03-31 14:50:15 +03:00
udev: Fix SIGSEGV in AlternativeNamesPolicy handling
The function sd_device_get_property_value has some paths where it exits without touching the n pointer. In those cases, n remained uninitialized until it was eventually read inside isempty where it caused the segmentation fault. Fixes #15078
This commit is contained in:
parent
e7b0ea5440
commit
61fd7d6720
@ -498,7 +498,7 @@ int link_config_apply(link_config_ctx *ctx, link_config *config,
|
||||
|
||||
if (config->alternative_names_policy)
|
||||
for (NamePolicy *p = config->alternative_names_policy; *p != _NAMEPOLICY_INVALID; p++) {
|
||||
const char *n;
|
||||
const char *n = NULL;
|
||||
|
||||
switch (*p) {
|
||||
case NAMEPOLICY_DATABASE:
|
||||
|
Loading…
x
Reference in New Issue
Block a user