[Python-checkins] CVS: python/dist/src/Modules pyexpat.c,2.2,2.3

Guido van Rossum python-dev@python.org
2000年4月10日 08:46:08 -0400 (EDT)


Update of /projects/cvsroot/python/dist/src/Modules
In directory eric:/projects/python/develop/guido/src/Modules
Modified Files:
	pyexpat.c 
Log Message:
Skip Montanaro: add string precisions to calls to PyErr_Format
to prevent possible buffer overruns.
Index: pyexpat.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/pyexpat.c,v
retrieving revision 2.2
retrieving revision 2.3
diff -C2 -r2.2 -r2.3
*** pyexpat.c	2000年03月31日 16:18:11	2.2
--- pyexpat.c	2000年04月10日 12:46:05	2.3
***************
*** 308,312 ****
 }
 else if (rv == 0) {
! PyErr_Format(ErrorObject, "%s: line %i, column %i",
 XML_ErrorString( XML_GetErrorCode(self->itself) ),
 XML_GetErrorLineNumber(self->itself),
--- 308,312 ----
 }
 else if (rv == 0) {
! PyErr_Format(ErrorObject, "%.200s: line %i, column %i",
 XML_ErrorString( XML_GetErrorCode(self->itself) ),
 XML_GetErrorLineNumber(self->itself),
***************
*** 684,688 ****
 initpyexpat(){
 PyObject *m, *d;
! char *rev="$Revision: 2.2 $";
 PyObject *errors_module, *errors_dict;
 
--- 684,688 ----
 initpyexpat(){
 PyObject *m, *d;
! char *rev="$Revision: 2.3 $";
 PyObject *errors_module, *errors_dict;
 

AltStyle によって変換されたページ (->オリジナル) /