From 05f51b2fbe91122f489a9d1a6e74e7879612f848 Mon Sep 17 00:00:00 2001 From: schwarze Date: Sat, 27 Aug 2016 16:39:42 +0000 Subject: [PATCH] Stop recommending the non-standard and slightly dangerous fgetln(3). Recommend POSIX getline(3) instead. --- lib/libc/stdio/fgets.3 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libc/stdio/fgets.3 b/lib/libc/stdio/fgets.3 index 8b50c37ef90..b8b3795a173 100644 --- a/lib/libc/stdio/fgets.3 +++ b/lib/libc/stdio/fgets.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fgets.3,v 1.33 2014/11/04 20:06:29 tedu Exp $ +.\" $OpenBSD: fgets.3,v 1.34 2016/08/27 16:39:42 schwarze Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: November 4 2014 $ +.Dd $Mdocdate: August 27 2016 $ .Dt FGETS 3 .Os .Sh NAME @@ -113,7 +113,7 @@ or .Sh SEE ALSO .Xr feof 3 , .Xr ferror 3 , -.Xr fgetln 3 +.Xr getline 3 .Sh STANDARDS The function .Fn fgets @@ -167,7 +167,7 @@ which may indeed include a newline. .El .Pp Consider using -.Xr fgetln 3 +.Xr getline 3 instead when dealing with untrusted input. .Pp It is erroneous to assume that -- 2.20.1