[Issue]
Crash during reserving memory for camera devices vector.
[Description]
It was possible before this patch, that camera list holds
random value from stack. It was not initialized during
declaration and platform library also did not change list
count to zero. In results vector was reserved with some
invalid value, leading to crash.
Bug: https://jira-eu.sec.samsung.net/browse/VDGAME-537
Change-Id: Ib5cfd376a0008c14c27c4e5ad13e804ad90db395
Signed-off-by: Jakub Gajownik <j.gajownik2@samsung.com>
std::vector<VideoCaptureDeviceInfo>
VideoCaptureDeviceFactoryTizenTv::GetDevices() {
std::vector<VideoCaptureDeviceInfo> result;
- camera_device_list_s list;
+ camera_device_list_s list{};
// Ensure that other thread won't try allocating camera device.
base::AutoLock lock(devices_lock_);