diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-10-20 18:31:10 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-10-21 06:19:13 +0000 |
commit | b6df7257501b54521c25587c3c5e600b2c9393d1 (patch) | |
tree | e1fb1ad3e4f263e826394e3d7d3b4db8ecd175f3 /src/plugins/platforms | |
parent | 0cccc23478432240f44cabfd853e60ff8c84c692 (diff) |
Fix UB (ininited pointer read) in qt_egl_device_integration()
The m_integration member of DeviceIntegration, a naked pointer, was
checked for nullptr in the DeviceIntegration ctor, but never set to
nullptr.
Fix by init'ing it to nullptr in the ctor-init-list.
Coverity-Id: 172056
Change-Id: Ia1dc9b67b9d16a991bba82338eedb19de68f91d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfshooks.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfshooks.cpp b/src/plugins/platforms/eglfs/qeglfshooks.cpp index cf016d1b01..638960d998 100644 --- a/src/plugins/platforms/eglfs/qeglfshooks.cpp +++ b/src/plugins/platforms/eglfs/qeglfshooks.cpp @@ -61,6 +61,7 @@ private: Q_GLOBAL_STATIC(DeviceIntegration, deviceIntegration) DeviceIntegration::DeviceIntegration() + : m_integration(Q_NULLPTR) { QStringList pluginKeys = QEGLDeviceIntegrationFactory::keys(); if (!pluginKeys.isEmpty()) { |