Module Name:    src
Committed By:   dholland
Date:           Sat Jun 11 06:59:21 UTC 2016

Modified Files:
        src/sys/lib/libsa: getfile.c

Log Message:
PR 51200 gets in libsa considered harmful: use kgets


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/lib/libsa/getfile.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libsa/getfile.c
diff -u src/sys/lib/libsa/getfile.c:1.9 src/sys/lib/libsa/getfile.c:1.10
--- src/sys/lib/libsa/getfile.c:1.9	Sat Nov 24 13:20:55 2007
+++ src/sys/lib/libsa/getfile.c	Sat Jun 11 06:59:21 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: getfile.c,v 1.9 2007/11/24 13:20:55 isaki Exp $	*/
+/*	$NetBSD: getfile.c,v 1.10 2016/06/11 06:59:21 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -42,7 +42,7 @@ getfile(char *prompt, int mode)
 
 	do {
 		printf("%s: ", prompt);
-		gets(buf);
+		kgets(buf, sizeof(buf));
 		if (buf[0] == CTRL('d') && buf[1] == 0)
 			return -1;
 	} while ((fd = open(buf, mode)) < 0);

Reply via email to