libblkid: Fix segfault when blkid.conf doesn't exist
authorKarel Zak <kzak@redhat.com>
Mon, 1 Apr 2024 10:14:50 +0000 (12:14 +0200)
committerChris Hofstaedtler <zeha@debian.org>
Sat, 27 Apr 2024 12:23:31 +0000 (14:23 +0200)
commitf55326a5f03157e1a86d2232c697f1eeb44f2c88
tree8ee1f372966139fd190109b7faf5bcef7fc95b6b
parentbcd7022df2f1cdc661c1422bf6b9443b9443ff3e
libblkid: Fix segfault when blkid.conf doesn't exist

* Move 'line' and 'uevent' to the beginning of the LIBECONF code.
* Remove unwanted space between function name and arguments.
* Check for 'line' pointer before dereferencing.

References: https://github.com/util-linux/util-linux/pull/2883
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 7e357241b413a01c37b0b4d064bc0a47e3259361)

Gbp-Pq: Topic upstream
Gbp-Pq: Name libblkid-Fix-segfault-when-blkid.conf-doesn-t-exist.patch
libblkid/src/config.c