From: Neal Norwitz Date: Tue, 5 Nov 2002 22:41:37 +0000 (+0000) Subject: Use PyOS_snprintf() instead of sprintf and wrap the long line X-Git-Tag: v2.3c1~3555 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=03b109afc0c646e0ade38a0b3132d36cae412024;p=thirdparty%2FPython%2Fcpython.git Use PyOS_snprintf() instead of sprintf and wrap the long line --- diff --git a/Objects/listobject.c b/Objects/listobject.c index c28bfb485a7a..bee284d6077a 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;