Eradicate calls to deprecated sprintf()

This commit is contained in:
Erica Fischer
2023-07-06 12:57:38 -07:00
parent 350d79399f
commit 1c2c07c596
7 changed files with 20 additions and 20 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ void json_context(json_object *j) {
char *s = json_stringify(j);
if (strlen(s) >= 500) {
sprintf(s + 497, "...");
snprintf(s + 497, strlen(s) + 1 - 497, "...");
}
fprintf(stderr, "in JSON object %s\n", s);