mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
In case a regular directory was specified, rather than a device node, the check if the device exists will pass. The following code paths then assume a slot id was specified. This in turn may lead to a buffer overflow when the device data is copied to to the zpci_device struct. Check if the specified path is a regular directory and prevent a possible later buffer overflow and copying wrong data respectively. Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>