diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-10-07 20:36:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-07 20:36:21 (GMT) |
commit | 90f2c7992f3d3285bafa1eef6d0f8255ce8921c2 (patch) | |
tree | 8c8b71e1a104af89e783e0c5b5bd5e61d978af1a /Python | |
parent | a3a3701fec80599f19da0faf6547cfbe58fcad13 (diff) | |
download | cpython-90f2c7992f3d3285bafa1eef6d0f8255ce8921c2.zip cpython-90f2c7992f3d3285bafa1eef6d0f8255ce8921c2.tar.gz cpython-90f2c7992f3d3285bafa1eef6d0f8255ce8921c2.tar.bz2 |
Add a warning message about PyOS_snprintf (GH-95993)
(cherry picked from commit c7b220499662f0c7a4cae51e33372f92ca7b1ee9)
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Diffstat (limited to 'Python')
-rw-r--r-- | Python/mysnprintf.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/mysnprintf.c b/Python/mysnprintf.c index cd69198..2a505d1 100644 --- a/Python/mysnprintf.c +++ b/Python/mysnprintf.c @@ -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. |