Commit f51f911a authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

wined3d: Use snprintf() in init_debug_buffer() (Coverity).

parent bdc0a990
......@@ -4340,9 +4340,9 @@ struct debug_buffer
static void init_debug_buffer(struct debug_buffer *buffer, const char *default_string)
{
strcpy(buffer->str, default_string);
snprintf(buffer->str, sizeof(buffer->str), "%s", default_string);
buffer->ptr = buffer->str;
buffer->size = ARRAY_SIZE(buffer->str);
buffer->size = sizeof(buffer->str);
}
static void debug_append(struct debug_buffer *buffer, const char *str, const char *separator)
......@@ -4355,7 +4355,7 @@ static void debug_append(struct debug_buffer *buffer, const char *str, const cha
if (size == -1 || size >= buffer->size)
{
buffer->size = 0;
strcpy(&buffer->str[ARRAY_SIZE(buffer->str) - 4], "...");
strcpy(&buffer->str[sizeof(buffer->str) - 4], "...");
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment