If a DirectShow device fails to initialize, OBS crashes from numerous uninitialized memory reads.
Code:
diff --git a/DShowPlugin/DeviceSource.cpp b/DShowPlugin/DeviceSource.cpp
index 0d95239..c7632cb 100644
--- a/DShowPlugin/DeviceSource.cpp
+++ b/DShowPlugin/DeviceSource.cpp
@@ -87,10 +87,10 @@ bool DeviceSource::LoadFilters()
bool bSucceeded = false;
List<MediaOutputInfo> outputList;
- IAMStreamConfig *config;
- bool bAddedCapture, bAddedDevice;
+ IAMStreamConfig *config = NULL;
+ bool bAddedCapture = false, bAddedDevice = false;
GUID expectedMediaType;
- IPin *devicePin;
+ IPin *devicePin = NULL;
HRESULT err;
String strDevice = data->GetString(TEXT("device"));