#include "tcuResultCollector.hpp"
#include "deUniquePtr.hpp"
+#include "deString.h"
#include "deStringUtil.hpp"
#include "deSTLUtil.hpp"
#include "deMemory.h"
return tcu::TestStatus::fail("deviceProperties incomplete initialization");
}
+ // Check if deviceName string is properly terminated.
+ if (deStrnlen(props->deviceName, VK_MAX_PHYSICAL_DEVICE_NAME_SIZE) == VK_MAX_PHYSICAL_DEVICE_NAME_SIZE)
+ {
+ log << TestLog::Message << "deviceProperties - VkPhysicalDeviceProperties deviceName not properly initialized" << TestLog::EndMessage;
+ return tcu::TestStatus::fail("deviceProperties incomplete initialization");
+ }
+
{
const ApiVersion deviceVersion = unpackVersion(props->apiVersion);
const ApiVersion deqpVersion = unpackVersion(VK_API_VERSION);
#endif
}
+size_t deStrnlen (const char* string, size_t maxSize)
+{
+#if ((DE_COMPILER == DE_COMPILER_MSC) && (DE_OS != DE_OS_WINCE)) || (__STDC_VERSION__ >= 201100L)
+ return strnlen_s(string, maxSize);
+#else
+ return strnlen(string, maxSize);
+#endif
+
+}
+
DE_END_EXTERN_C
deInt32 deSprintf (char* string, size_t size, const char* format, ...) DE_PRINTF_FUNC_ATTR(3, 4);
char* deStrcpy (char* dst, size_t size, const char* src);
char* deStrcat (char* s1, size_t size, const char* s2);
+size_t deStrnlen (const char* string, size_t maxSize);
DE_END_EXTERN_C