Closed cohuck closed 6 years ago
fyi, the just pushed fix addresses only the behaviour of util_ptr_vec_free(). I found numerous places in other tools that don't check for the util_scandir() return value as well. This will be addressed in another patch series.
Thanks for reporting!
Running 'lsqeth' if the qeth driver is not loaded gives you:
and the core is dumped.
This code in main() (lsqeth.c) where it apparently crashes looks fishy:
If the qeth module is not loaded, /sys/bus/ccwgroup/drivers/qeth/ will not exist. Consequently, __scandir() when called by util_scandir()->scandir_regexp() will fail to open it and return -1 (even though the documentation states that util_scandir() returns a 'Number of returned directory entries', which seems to imply >= 0 to me). The code above does not seem to be prepared for handling count == -1.
Not sure where the best place to fix that is.