Use snprintf instead of sprintf

This commit is contained in:
Behdad Esfahbod 2022-10-13 11:30:02 -06:00
parent 9559d3c1c1
commit 294b1c9f6e
2 changed files with 2 additions and 2 deletions

View File

@ -118,7 +118,7 @@ struct Ligature
match_positions[i] += delta;
if (i)
*p++ = ',';
sprintf (p, "%u", match_positions[i]);
snprintf (p, sizeof(buf), "%u", match_positions[i]);
p += strlen(p);
}

View File

@ -117,7 +117,7 @@ struct Sequence
{
if (buf < p)
*p++ = ',';
sprintf (p, "%u", i);
snprintf (p, sizeof(buf), "%u", i);
p += strlen(p);
}