From: Paul Eggert Date: Sun, 6 Aug 2023 19:19:36 +0000 (-0700) Subject: Document Android, OpenBSD printf "%n" lack X-Git-Tag: v1.0~958 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=ef7951ae4db678d0a29e7567d0a46c4e079ce1bf;p=gnulib.git Document Android, OpenBSD printf "%n" lack In doc/posix/functions/*printf*.texi, document that the POSIX-specified printf functions do not support the %n format on Android and OpenBSD. This lack of support is deliberate, as %n is a common target of attacks on security. --- diff --git a/doc/posix-functions/dprintf.texi b/doc/posix-functions/dprintf.texi index 2f90377590..92b73a97b5 100644 --- a/doc/posix-functions/dprintf.texi +++ b/doc/posix-functions/dprintf.texi @@ -37,7 +37,7 @@ AIX 7.2, Solaris 11.4, Cygwin 2.9.0. @item This function does not support the @samp{n} directive on some platforms: glibc when used with @code{_FORTIFY_SOURCE >= 2} (set by default on Ubuntu), -macOS 11.1. +Android, OpenBSD, macOS 11.1. @item This function does not support precisions in the @samp{ls} directive correctly on some platforms: diff --git a/doc/posix-functions/fprintf.texi b/doc/posix-functions/fprintf.texi index 7e1d2254ca..be20b67079 100644 --- a/doc/posix-functions/fprintf.texi +++ b/doc/posix-functions/fprintf.texi @@ -42,7 +42,7 @@ Cygwin 1.5.x, mingw, MSVC 14. @item This function does not support the @samp{n} directive on some platforms: glibc when used with @code{_FORTIFY_SOURCE >= 2} (set by default on Ubuntu), -macOS 11.1, MSVC 14. +Android, OpenBSD, macOS 11.1, MSVC 14. @item This function does not support the @samp{ls} directive on some platforms: OpenBSD 4.0, IRIX 6.5, Cygwin 1.5.x, Haiku. diff --git a/doc/posix-functions/printf.texi b/doc/posix-functions/printf.texi index e8fafa4bdb..38489e292a 100644 --- a/doc/posix-functions/printf.texi +++ b/doc/posix-functions/printf.texi @@ -42,7 +42,7 @@ Cygwin 1.5.x, mingw, MSVC 14. @item This function does not support the @samp{n} directive on some platforms: glibc when used with @code{_FORTIFY_SOURCE >= 2} (set by default on Ubuntu), -macOS 11.1, MSVC 14. +Android, OpenBSD, macOS 11.1, MSVC 14. @item This function does not support the @samp{ls} directive on some platforms: OpenBSD 4.0, IRIX 6.5, Cygwin 1.5.x, Haiku. diff --git a/doc/posix-functions/snprintf.texi b/doc/posix-functions/snprintf.texi index 032c6ff023..25e86e6fea 100644 --- a/doc/posix-functions/snprintf.texi +++ b/doc/posix-functions/snprintf.texi @@ -57,7 +57,7 @@ Cygwin 1.5.x, mingw, MSVC 14. @item This function does not support the @samp{n} directive on some platforms: glibc when used with @code{_FORTIFY_SOURCE >= 2} (set by default on Ubuntu), -macOS 11.1, MSVC 14. +Android, OpenBSD, macOS 11.1, MSVC 14. @item This function does not support the @samp{ls} directive on some platforms: OpenBSD 4.0, IRIX 6.5, Cygwin 1.5.x, Haiku. @@ -97,7 +97,7 @@ This function does not truncate the result as specified in C99 on some platforms mingw, MSVC 14. @item This function does not fully support the @samp{n} directive on some platforms: -HP-UX 11, mingw, MSVC 14. +HP-UX 11, mingw. @end itemize Portability problems fixed by Gnulib module @code{snprintf-gnu}: diff --git a/doc/posix-functions/sprintf.texi b/doc/posix-functions/sprintf.texi index 5d88d38c3f..6aaf7b4b93 100644 --- a/doc/posix-functions/sprintf.texi +++ b/doc/posix-functions/sprintf.texi @@ -42,7 +42,7 @@ Cygwin 1.5.x, mingw, MSVC 14. @item This function does not support the @samp{n} directive on some platforms: glibc when used with @code{_FORTIFY_SOURCE >= 2} (set by default on Ubuntu), -macOS 11.1, MSVC 14. +Android, OpenBSD, macOS 11.1, MSVC 14. @item This function does not support the @samp{ls} directive on some platforms: OpenBSD 4.0, IRIX 6.5, Cygwin 1.5.x, Haiku. diff --git a/doc/posix-functions/swprintf.texi b/doc/posix-functions/swprintf.texi index 7883bfbe44..6029adbb66 100644 --- a/doc/posix-functions/swprintf.texi +++ b/doc/posix-functions/swprintf.texi @@ -24,7 +24,7 @@ MSVC 14. @item This function does not support the @samp{n} directive on some platforms: glibc when used with @code{_FORTIFY_SOURCE >= 2} (set by default on Ubuntu), -macOS 11.1, MSVC 14. +Android, OpenBSD, macOS 11.1, MSVC 14. @item This function sometimes returns a wrong value through the @samp{n} directive on some platforms: diff --git a/doc/posix-functions/vdprintf.texi b/doc/posix-functions/vdprintf.texi index f21172c441..05f001d707 100644 --- a/doc/posix-functions/vdprintf.texi +++ b/doc/posix-functions/vdprintf.texi @@ -37,7 +37,7 @@ AIX 7.2, Solaris 11.4, Cygwin 2.9.0. @item This function does not support the @samp{n} directive on some platforms: glibc when used with @code{_FORTIFY_SOURCE >= 2} (set by default on Ubuntu), -macOS 11.1. +Android, OpenBSD, macOS 11.1. @item This function does not support precisions in the @samp{ls} directive correctly on some platforms: diff --git a/doc/posix-functions/vfprintf.texi b/doc/posix-functions/vfprintf.texi index b4ae2cc733..6d1c1600fd 100644 --- a/doc/posix-functions/vfprintf.texi +++ b/doc/posix-functions/vfprintf.texi @@ -42,7 +42,7 @@ Cygwin 1.5.x, mingw, MSVC 14. @item This function does not support the @samp{n} directive on some platforms: glibc when used with @code{_FORTIFY_SOURCE >= 2} (set by default on Ubuntu), -macOS 11.1, MSVC 14. +Android, OpenBSD, macOS 11.1, MSVC 14. @item This function does not support the @samp{ls} directive on some platforms: OpenBSD 4.0, IRIX 6.5, Cygwin 1.5.x, Haiku. diff --git a/doc/posix-functions/vprintf.texi b/doc/posix-functions/vprintf.texi index a69eb467cd..d277d3b1f8 100644 --- a/doc/posix-functions/vprintf.texi +++ b/doc/posix-functions/vprintf.texi @@ -42,7 +42,7 @@ Cygwin 1.5.x, mingw, MSVC 14. @item This function does not support the @samp{n} directive on some platforms: glibc when used with @code{_FORTIFY_SOURCE >= 2} (set by default on Ubuntu), -macOS 11.1, MSVC 14. +Android, OpenBSD, macOS 11.1, MSVC 14. @item This function does not support the @samp{ls} directive on some platforms: OpenBSD 4.0, IRIX 6.5, Cygwin 1.5.x, Haiku. diff --git a/doc/posix-functions/vsnprintf.texi b/doc/posix-functions/vsnprintf.texi index 90613a95ef..24b39bffb5 100644 --- a/doc/posix-functions/vsnprintf.texi +++ b/doc/posix-functions/vsnprintf.texi @@ -91,7 +91,7 @@ mingw, MSVC 14. @item This function does not fully support the @samp{n} directive on some platforms: glibc when used with @code{_FORTIFY_SOURCE >= 2} (set by default on Ubuntu), -macOS 11.1, HP-UX 11, mingw, MSVC 14. +Android, OpenBSD, macOS 11.1, HP-UX 11, mingw, MSVC 14. @item This function overwrites memory even when a zero size argument is passed on some platforms: diff --git a/doc/posix-functions/vsprintf.texi b/doc/posix-functions/vsprintf.texi index e75af4fb3b..0b8079df23 100644 --- a/doc/posix-functions/vsprintf.texi +++ b/doc/posix-functions/vsprintf.texi @@ -42,7 +42,7 @@ Cygwin 1.5.x, mingw, MSVC 14. @item This function does not support the @samp{n} directive on some platforms: glibc when used with @code{_FORTIFY_SOURCE >= 2} (set by default on Ubuntu), -macOS 11.1, MSVC 14. +Android, OpenBSD, macOS 11.1, MSVC 14. @item This function does not support the @samp{ls} directive on some platforms: OpenBSD 4.0, IRIX 6.5, Cygwin 1.5.x, Haiku.