summaryrefslogtreecommitdiffstats
path: root/Python/mysnprintf.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-10-07 20:26:46 (GMT)
committerGitHub <noreply@github.com>2022-10-07 20:26:46 (GMT)
commit0a84b7aa4d89c9af7fa10dcb9943490669da4db6 (patch)
tree858a3f6b26f5e1123a84d4c424d531f9686486a1 /Python/mysnprintf.c
parent107ba927cf60d26c1f6302a8c953de5ed136dd35 (diff)
downloadcpython-0a84b7aa4d89c9af7fa10dcb9943490669da4db6.zip
cpython-0a84b7aa4d89c9af7fa10dcb9943490669da4db6.tar.gz
cpython-0a84b7aa4d89c9af7fa10dcb9943490669da4db6.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/mysnprintf.c')
-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.