mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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:
parent
05bd787c6c
commit
885d457709
15 changed files with 61 additions and 42 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue