Skip to content
Snippets Groups Projects
Commit 8a459f59 authored by Yuxuan Shui's avatar Yuxuan Shui Committed by Henri Verbeet
Browse files

tests: Pass the correct buffer size to vsnprintf() in vkd3d_test_push_context().

parent 222c5238
No related branches found
No related tags found
1 merge request!896tests: Fix out-of-bound array access.
Pipeline #27547 skipped
......@@ -412,7 +412,7 @@ static inline void vkd3d_test_push_context(const char *fmt, ...)
{
va_start(args, fmt);
vsnprintf(vkd3d_test_state.context[vkd3d_test_state.context_count],
sizeof(vkd3d_test_state.context), fmt, args);
sizeof(*vkd3d_test_state.context), fmt, args);
va_end(args);
vkd3d_test_state.context[vkd3d_test_state.context_count][sizeof(vkd3d_test_state.context[0]) - 1] = '\0';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment