blockdev-util: fix access to possibly invalidated dirent struct
authorLennart Poettering <lennart@poettering.net>
Fri, 19 Mar 2021 10:14:52 +0000 (11:14 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 19 Mar 2021 17:13:17 +0000 (18:13 +0100)
commitc68fc3514ddd53abd7ecfd22afb07aa0ad785c5c
tree2fddba3316492fc47caec31123a5505c1e9665d0
parentf9b3afae96c72564cd4cd766555845f17e3c12a9
blockdev-util: fix access to possibly invalidated dirent struct

Let's copy out the string we need from the dirent, there's no reason to
believe the dirent struct might live for longer than one loop iteration.
src/basic/blockdev-util.c