udev: Fix SIGSEGV in AlternativeNamesPolicy handling
authorLénaïc Huard <lenaic@lhuard.fr>
Wed, 1 Apr 2020 21:45:08 +0000 (23:45 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 2 Apr 2020 08:18:56 +0000 (10:18 +0200)
commit61fd7d6720c562c88ab79062ff8d131e5e3c7b1b
treee39a4809d1ef392b279461ae7584d911a4bb26c0
parente7b0ea544004fec4bb97f8db35942a196126cc8c
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
src/udev/net/link-config.c