udev: Fix SIGSEGV in AlternativeNamesPolicy handling
authorLénaïc Huard <lenaic@lhuard.fr>
Wed, 1 Apr 2020 21:45:08 +0000 (23:45 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 17 Apr 2020 10:21:17 +0000 (12:21 +0200)
commit3fa7fdce595c3d5ceee52f154f3f4e6a5515c34b
tree5c2c6fa9e23c475d4c129b2401c39eb3866ef55d
parent2c4229221c77e3bcc7d32418d8adf1efce3ba962
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

(cherry picked from commit 61fd7d6720c562c88ab79062ff8d131e5e3c7b1b)
src/udev/net/link-config.c