diff --git a/src/OT/Layout/GSUB/Ligature.hh b/src/OT/Layout/GSUB/Ligature.hh index f373d921b..6caa80e05 100644 --- a/src/OT/Layout/GSUB/Ligature.hh +++ b/src/OT/Layout/GSUB/Ligature.hh @@ -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); } diff --git a/src/OT/Layout/GSUB/Sequence.hh b/src/OT/Layout/GSUB/Sequence.hh index 3d84a5e6e..abf1c643f 100644 --- a/src/OT/Layout/GSUB/Sequence.hh +++ b/src/OT/Layout/GSUB/Sequence.hh @@ -117,7 +117,7 @@ struct Sequence { if (buf < p) *p++ = ','; - sprintf (p, "%u", i); + snprintf (p, sizeof(buf), "%u", i); p += strlen(p); }