summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2022-10-07 18:49:53 (GMT)
committerGitHub <noreply@github.com>2022-10-07 18:49:53 (GMT)
commitc7b220499662f0c7a4cae51e33372f92ca7b1ee9 (patch)
tree492d6fd661848364fdedc9fa8060e5f8338ab8d3 /Python
parentd5fea01d9d439b1638cd8e5db19c33909841d86f (diff)
downloadcpython-c7b220499662f0c7a4cae51e33372f92ca7b1ee9.zip
cpython-c7b220499662f0c7a4cae51e33372f92ca7b1ee9.tar.gz
cpython-c7b220499662f0c7a4cae51e33372f92ca7b1ee9.tar.bz2
Add a warning message about PyOS_snprintf (#95993)
Diffstat (limited to 'Python')
-rw-r--r--Python/mysnprintf.c1
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.