Skip to content

Commit 0d0ec3b

Browse files
committed
Use sprintf_s instead of sprintf
1 parent 2c03fb7 commit 0d0ec3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/plutosvg-ft.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static FT_Error plutosvg_ft_render(FT_GlyphSlot ft_slot, FT_Pointer* ft_state)
149149
char buffer[64];
150150
char* id = NULL;
151151
if(start_glyph_id < end_glyph_id) {
152-
sprintf(buffer, "glyph%u", ft_slot->glyph_index);
152+
sprintf_s(buffer, (sizeof(buffer) / sizeof(buffer[0])), "glyph%u", ft_slot->glyph_index);
153153
id = buffer;
154154
}
155155

@@ -231,7 +231,7 @@ static FT_Error plutosvg_ft_preset_slot(FT_GlyphSlot ft_slot, FT_Bool ft_cache,
231231
char buffer[64];
232232
char* id = NULL;
233233
if(start_glyph_id < end_glyph_id) {
234-
sprintf(buffer, "glyph%u", ft_slot->glyph_index);
234+
sprintf_s(buffer, (sizeof(buffer) / sizeof(buffer[0])), "glyph%u", ft_slot->glyph_index);
235235
id = buffer;
236236
}
237237

0 commit comments

Comments
 (0)