Mailing List Archive

python/dist/src/Objects listobject.c,2.139,2.140
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv32254/Objects

Modified Files:
listobject.c
Log Message:
Use PyOS_snprintf() instead of sprintf and wrap the long line

Index: listobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v
retrieving revision 2.139
retrieving revision 2.140
diff -C2 -d -r2.139 -r2.140
*** listobject.c 5 Nov 2002 17:38:05 -0000 2.139
--- listobject.c 5 Nov 2002 22:41:37 -0000 2.140
***************
*** 458,463 ****
else {
char msg[256];
! sprintf(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)
--- 458,465 ----
else {
char msg[256];
! 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)