From cf76ab7f6ef4dd5cbf4a3ea1375ef4dc54ceb152 Mon Sep 17 00:00:00 2001 From: Philippe Coval Date: Wed, 24 Jan 2018 00:14:08 +0100 Subject: [PATCH] libusbdevice: Init class members This will prevent segfault in: XprotolabInterface::sniffProtocol Change-Id: Ifb80c83c75a495c3eaf2a2392919100ec8ea5f13 Origin: https://github.com/rzr/xscopes-qt/ URL: https://github.com/ganzziani/xscopes-qt/pull/31 Signed-off-by: Philippe Coval --- libusbdevice.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libusbdevice.cpp b/libusbdevice.cpp index a22b7d4..f70e381 100644 --- a/libusbdevice.cpp +++ b/libusbdevice.cpp @@ -15,6 +15,8 @@ LibUsbDevice::LibUsbDevice(QObject *parent) : pcToUsbDeviceTransfer = NULL; usbDeviceToPcTransfer = NULL; dataAvailable = false; + count = 0; + dataLength = 0; hasHotPlugSupport = false; deviceFound = NULL; connect(&serial,SIGNAL(newData(int)),this,SLOT(newDataAvailable(int)));