Mercurial > cpython-lru_cache-weakref
diff Objects/listobject.c @ 26064:951407932001 legacy-trunk
Use PyOS_snprintf() instead of sprintf and wrap the long line
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Tue, 05 Nov 2002 22:41:37 +0000 |
| parents | e9aa394c7191 |
| children | dd10d97d329a |
line wrap: on
line diff
--- a/Objects/listobject.c Tue Nov 05 22:41:33 2002 +0000 +++ b/Objects/listobject.c Tue Nov 05 22:41:37 2002 +0000 @@ -457,8 +457,10 @@ 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;
