mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
Add a warning message about PyOS_snprintf (GH-95993)
(cherry picked from commit c7b2204996
)
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
This commit is contained in:
parent
a3a3701fec
commit
90f2c7992f
2 changed files with 3 additions and 1 deletions
|
@ -9,6 +9,7 @@
|
|||
would have been written had the buffer not been too small, and to set
|
||||
the last byte of the buffer to \0. At least MS _vsnprintf returns a
|
||||
negative value instead, and fills the entire buffer with non-\0 data.
|
||||
Unlike C99, our wrappers do not support passing a null buffer.
|
||||
|
||||
The wrappers ensure that str[size-1] is always \0 upon return.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue