1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-08 14:02:17 +03:00

Removed strndup from trace-example (not available on all platforms)

This commit is contained in:
Georg Richter
2016-11-29 18:22:38 +01:00
parent 64536703c7
commit 326e719f0c

View File

@@ -230,7 +230,8 @@ static void trace_set_command(TRACE_INFO *info, char *buffer, size_t size)
if (info->command)
free(info->command);
info->command= strndup(buffer, size);
info->command= calloc(1, size + 1);
memcpy(info->command, buffer, size);
}
void dump_buffer(uchar *buffer, size_t len)