aboutsummaryrefslogtreecommitdiff
path: root/manual/stdio.texi
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2022-08-18 08:49:55 +0200
committerFlorian Weimer <fweimer@redhat.com>2022-12-12 15:40:20 +0100
commitb30518eedbce705f9f34970ff459083d738d2e36 (patch)
tree28c7c95320f1123e38cde445a4f43b9622c4f59a /manual/stdio.texi
parent45234c5d6ba9556451424940fa746e9e66b1a6f4 (diff)
downloadglibc-fw/vfprintf-2.tar.xz
glibc-fw/vfprintf-2.zip
libio: Convert __vswprintf_internal to buffers (bug 27857)fw/vfprintf-2
Always null-terminate the buffer and set E2BIG if the buffer is too small. This fixes bug 27857.
Diffstat (limited to 'manual/stdio.texi')
-rw-r--r--manual/stdio.texi7
1 files changed, 4 insertions, 3 deletions
diff --git a/manual/stdio.texi b/manual/stdio.texi
index 4aa1a2bc2d..f6319a4b8a 100644
--- a/manual/stdio.texi
+++ b/manual/stdio.texi
@@ -2412,9 +2412,10 @@ allocate at least @var{size} wide characters for the string @var{ws}.
The return value is the number of characters generated for the given
input, excluding the trailing null. If not all output fits into the
-provided buffer a negative value is returned. You should try again with
-a bigger output string. @emph{Note:} this is different from how
-@code{snprintf} handles this situation.
+provided buffer a negative value is returned, and @code{errno} is set to
+@code{E2BIG}. (The setting of @code{errno} is a GNU extension.) You
+should try again with a bigger output string. @emph{Note:} this is
+different from how @code{snprintf} handles this situation.
Note that the corresponding narrow stream function takes fewer
parameters. @code{swprintf} in fact corresponds to the @code{snprintf}