sprintf -> PyOS_snprintf in some "obviously safe" cases.

Also changed <>-style #includes to ""-style in some places where the
former didn't make sense.
This commit is contained in:
Tim Peters 2001-11-28 20:27:42 +00:00
parent 05bd787c6c
commit 885d457709
15 changed files with 61 additions and 42 deletions

View file

@ -129,7 +129,7 @@ set_error(xmlparseobject *self)
int column = XML_GetErrorColumnNumber(parser);
enum XML_Error code = XML_GetErrorCode(parser);
sprintf(buffer, "%.200s: line %i, column %i",
PyOS_snprintf(buffer, sizeof(buffer), "%.200s: line %i, column %i",
XML_ErrorString(code), lineno, column);
err = PyObject_CallFunction(ErrorObject, "s", buffer);
if ( err != NULL