From 03b109afc0c646e0ade38a0b3132d36cae412024 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Tue, 5 Nov 2002 22:41:37 +0000 Subject: Use PyOS_snprintf() instead of sprintf and wrap the long line --- Objects/listobject.c | 6 ++++-- 1 file 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; -- cgit v0.12