Use snprintf instead of sprintf
This commit is contained in:
parent
9559d3c1c1
commit
294b1c9f6e
src/OT/Layout/GSUB
|
@ -118,7 +118,7 @@ struct Ligature
|
||||||
match_positions[i] += delta;
|
match_positions[i] += delta;
|
||||||
if (i)
|
if (i)
|
||||||
*p++ = ',';
|
*p++ = ',';
|
||||||
sprintf (p, "%u", match_positions[i]);
|
snprintf (p, sizeof(buf), "%u", match_positions[i]);
|
||||||
p += strlen(p);
|
p += strlen(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ struct Sequence
|
||||||
{
|
{
|
||||||
if (buf < p)
|
if (buf < p)
|
||||||
*p++ = ',';
|
*p++ = ',';
|
||||||
sprintf (p, "%u", i);
|
snprintf (p, sizeof(buf), "%u", i);
|
||||||
p += strlen(p);
|
p += strlen(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue