[Python-checkins] CVS: python/dist/src/Python ceval.c,2.174,2.175 dynload_next.c,2.2,2.3
Guido van Rossum
python-dev@python.org
Mon, 10 Apr 2000 08:45:13 -0400 (EDT)
Update of /projects/cvsroot/python/dist/src/Python
In directory eric:/projects/python/develop/guido/src/Python
Modified Files:
ceval.c dynload_next.c
Log Message:
Skip Montanaro: add string precisions to calls to PyErr_Format
to prevent possible buffer overruns.
Index: ceval.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Python/ceval.c,v
retrieving revision 2.174
retrieving revision 2.175
diff -C2 -r2.174 -r2.175
*** ceval.c 2000/03/31 13:52:29 2.174
--- ceval.c 2000/04/10 12:45:10 2.175
***************
*** 2514,2518 ****
if (!PyFunction_Check(func)) {
PyErr_Format(PyExc_TypeError,
! "call of non-function (type %s)",
func->ob_type->tp_name);
return NULL;
--- 2514,2518 ----
if (!PyFunction_Check(func)) {
PyErr_Format(PyExc_TypeError,
! "call of non-function (type %.200s)",
func->ob_type->tp_name);
return NULL;
Index: dynload_next.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Python/dynload_next.c,v
retrieving revision 2.2
retrieving revision 2.3
diff -C2 -r2.2 -r2.3
*** dynload_next.c 1999/12/22 14:09:35 2.2
--- dynload_next.c 2000/04/10 12:45:10 2.3
***************
*** 186,190 ****
/* UnlinkModule() isn't implimented in current versions, but calling it does no harm */
NSUnLinkModule(newModule, FALSE);
! PyErr_Format(PyExc_ImportError, "Loaded module does not contain symbol %s", funcname);
return NULL;
}
--- 186,192 ----
/* UnlinkModule() isn't implimented in current versions, but calling it does no harm */
NSUnLinkModule(newModule, FALSE);
! PyErr_Format(PyExc_ImportError,
! "Loaded module does not contain symbol %.200s",
! funcname);
return NULL;
}