summaryrefslogtreecommitdiffstats
path: root/Objects/listobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/listobject.c')
-rw-r--r--Objects/listobject.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c
index c28bfb4..bee284d 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -457,8 +457,10 @@ list_ass_slice(PyListObject *a, int ilow, int ihigh, PyObject *v)
n = 0;
else {
char msg[256];
- sprintf(msg, "must assign sequence (not \"%.200s\") to slice",
- v->ob_type->tp_name);
+ PyOS_snprintf(msg, sizeof(msg),
+ "must assign sequence"
+ " (not \"%.200s\") to slice",
+ v->ob_type->tp_name);
v_as_SF = PySequence_Fast(v, msg);
if(v_as_SF == NULL)
return -1;