summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Parser/grammar1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Parser/grammar1.c b/Parser/grammar1.c
index 912d387..b76719a 100644
--- a/Parser/grammar1.c
+++ b/Parser/grammar1.c
@@ -39,7 +39,7 @@ PyGrammar_LabelRepr(label *lb)
return "EMPTY";
else if (ISNONTERMINAL(lb->lb_type)) {
if (lb->lb_str == NULL) {
- sprintf(buf, "NT%d", lb->lb_type);
+ PyOS_snprintf(buf, sizeof(buf), "NT%d", lb->lb_type);
return buf;
}
else
@@ -49,7 +49,7 @@ PyGrammar_LabelRepr(label *lb)
if (lb->lb_str == NULL)
return _PyParser_TokenNames[lb->lb_type];
else {
- sprintf(buf, "%.32s(%.32s)",
+ PyOS_snprintf(buf, sizeof(buf), "%.32s(%.32s)",
_PyParser_TokenNames[lb->lb_type], lb->lb_str);
return buf;
}