Skip to content

Commit

Permalink
Use safer snprintf call.
Browse files Browse the repository at this point in the history
  • Loading branch information
sanja-byelkin committed Oct 23, 2023
1 parent 8320f0d commit ae565ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion unittest/libmariadb/ps_bugs.c
Expand Up @@ -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);
Expand Down

0 comments on commit ae565ee

Please sign in to comment.