]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
putenv.3: Originated in SysVr2; in 4.3BSD-Reno; fixed on modern systems
authorнаб <nabijaczleweli@nabijaczleweli.xyz>
Tue, 23 May 2023 20:17:31 +0000 (22:17 +0200)
committerAlejandro Colomar <alx@kernel.org>
Tue, 23 May 2023 23:18:28 +0000 (01:18 +0200)
Fixed in:
  NetBSD 6     src lib/libc/stdlib/putenv.c 1.13
  FreeBSD 7    putenv(3) says so
  OpenBSD 4.6  src lib/libc/stdlib/setenv.c 1.10
and is correct under current(?) MacOS as well

The current wording implies that all of 4.4BSD's descenants also carry
this bug (at least it did to me): they did until like 2009 but they're
fine now

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man3/putenv.3

index 59c2ff1cf7261287818cf678748dc66fd463d824..cb80b29f953dae33af77a57c956bcc0be6dd70fb 100644 (file)
@@ -83,7 +83,7 @@ T}    Thread safety   MT-Unsafe const:env
 .SH STANDARDS
 POSIX.1-2008.
 .SH HISTORY
-POSIX.1-2001, SVr4, 4.3BSD.
+POSIX.1-2001, SVr2, 4.3BSD-Reno.
 .PP
 The
 .BR putenv ()
@@ -119,7 +119,8 @@ a copy of the string is used.
 On the one hand this causes a memory leak, and on the other hand
 it violates SUSv2.
 .PP
-The 4.4BSD version, like glibc 2.0, uses a copy.
+The 4.3BSD-Reno version, like glibc 2.0, uses a copy;
+this is fixed in all modern BSDs.
 .PP
 SUSv2 removes the \fIconst\fP from the prototype, and so does glibc 2.1.3.
 .PP