You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-07 02:42:49 +03:00
Use safer snprintf call.
This commit is contained in:
@@ -3251,7 +3251,7 @@ static int test_mem_overun(MYSQL *mysql)
|
||||
strcpy(buffer, "create table t_mem_overun(");
|
||||
for (i= 0; i < 1000; i++)
|
||||
{
|
||||
sprintf(field, "c%d int, ", i);
|
||||
snprintf(field, sizeof(field), "c%d int, ", i);
|
||||
strcat(buffer, field);
|
||||
}
|
||||
length= (int)strlen(buffer);
|
||||
|
Reference in New Issue
Block a user