Skip to content

Commit 95d6c52

Browse files
committed
Convert string_parser.c
1 parent cc74727 commit 95d6c52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Parser/string_parser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ decode_unicode_with_escapes(Parser *parser, const char *s, size_t len, Token *t)
118118
w_len = PyUnicode_GET_LENGTH(w);
119119
for (i = 0; i < w_len; i++) {
120120
Py_UCS4 chr = PyUnicode_READ(kind, data, i);
121-
sprintf(p, "\\U%08x", chr);
121+
PyOS_snprintf(p, 10 + 1, "\\U%08x", chr);
122122
p += 10;
123123
}
124124
/* Should be impossible to overflow */

0 commit comments

Comments
 (0)