Undo usage of PyOS_snprintf (rev. 1.51 of PyXML).

This commit is contained in:
Martin v. Löwis 2002-06-30 06:03:35 +00:00
parent 550fd5d799
commit 6b2cf0e5ea
1 changed files with 3 additions and 1 deletions

View File

@ -113,7 +113,9 @@ set_error(xmlparseobject *self)
int column = XML_GetErrorColumnNumber(parser);
enum XML_Error code = XML_GetErrorCode(parser);
PyOS_snprintf(buffer, sizeof(buffer), "%.200s: line %i, column %i",
/* There is no risk of overflowing this buffer, since
even for 64-bit integers, there is sufficient space. */
sprintf(buffer, "%.200s: line %i, column %i",
XML_ErrorString(code), lineno, column);
err = PyObject_CallFunction(ErrorObject, "s", buffer);
if ( err != NULL