summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2002-11-05 22:41:37 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2002-11-05 22:41:37 (GMT)
commit03b109afc0c646e0ade38a0b3132d36cae412024 (patch)
tree4a29a2f06916178aa00ae863db4b204bad1b833c
parent5d8d618c95a586743e8ac0c334c7d084c1cbc84c (diff)
downloadcpython-03b109afc0c646e0ade38a0b3132d36cae412024.zip
cpython-03b109afc0c646e0ade38a0b3132d36cae412024.tar.gz
cpython-03b109afc0c646e0ade38a0b3132d36cae412024.tar.bz2
Use PyOS_snprintf() instead of sprintf and wrap the long line
-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;