]> git.ipfire.org Git - thirdparty/util-linux.git/commit - libblkid/src/config.c
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)
committerKarel Zak <kzak@redhat.com>
Mon, 1 Apr 2024 10:14:50 +0000 (12:14 +0200)
commit7e357241b413a01c37b0b4d064bc0a47e3259361
treee307f38b20f0107a325ec40280de4d0605204c91
parente86a6a4cce0d3b9cab5407b67c6251aa184e1450
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>
libblkid/src/config.c