Change-Id: I222ec3b352aa220b6c08df3a71de48178b67f06d
Signed-off-by: Ben Davis <ben.davis@arm.com>
base::push_back(std::forward<arg_types>(args)...);
return true;
}
- catch (const std::bad_alloc &e)
+ catch (const std::bad_alloc &)
{
return false;
}
base::resize(std::forward<arg_types>(args)...);
return true;
}
- catch (const std::bad_alloc &e)
+ catch (const std::bad_alloc &)
{
return false;
}
}
};
-} /* namespace util */
\ No newline at end of file
+} /* namespace util */
{
auto &dst = m_ext_props[initial_size + i];
strncpy(dst.extensionName, extensions[i], sizeof(dst.extensionName));
+
+ if (strlen(extensions[i]) >= sizeof(dst.extensionName))
+ {
+ dst.extensionName[sizeof(dst.extensionName) - 1] = '\0';
+ }
}
return VK_SUCCESS;
}
util::extension_list extensions_required_by_layer{allocator};
surface_properties *props = get_surface_properties(wsi_ext.platform);
+ if (props == nullptr)
+ {
+ return VK_ERROR_INITIALIZATION_FAILED;
+ }
+
res = props->get_required_device_extensions(extensions_required_by_layer);
if (res != VK_SUCCESS)
{
*/
for (const auto &wsi_ext : supported_wsi_extensions)
{
- PFN_vkVoidFunction func = get_surface_properties(wsi_ext.platform)->get_proc_addr(name);
+ surface_properties *props = get_surface_properties(wsi_ext.platform);
+ if (props == nullptr)
+ {
+ return nullptr;
+ }
+
+ PFN_vkVoidFunction func = props->get_proc_addr(name);
if (func)
{
return func;