opnsense-ports/astro/qmapshack/files/patch-src_qmapshack_device_CDeviceWatcherLinux.cpp
Franco Fichtner 1e19029bb4 */*: sync with upstream
Taken from: HardenedBSD
2019-11-28 08:38:04 +01:00

13 lines
712 B
C++

--- src/qmapshack/device/CDeviceWatcherLinux.cpp.orig 2019-11-01 16:47:46 UTC
+++ src/qmapshack/device/CDeviceWatcherLinux.cpp
@@ -58,6 +58,10 @@ void CDeviceWatcherLinux::slotDeviceAdded(const QDBusO
// create path of to drive the block device belongs to
QDBusInterface * blockIface = new QDBusInterface("org.freedesktop.UDisks2", path.path(), "org.freedesktop.UDisks2.Block", QDBusConnection::systemBus(), this);
QDBusObjectPath drive_object = blockIface->property("Drive").value<QDBusObjectPath>();
+ if(drive_object.path() == nullptr)
+ {
+ return;
+ }
QString idLabel = blockIface->property("IdLabel").toString().toUpper();
// read vendor string attached to drive