Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys PR 51200 gets in libsa considered harmful: use kgets
details: https://anonhg.NetBSD.org/src/rev/c5295d49acaf
branches: trunk
changeset: 345858:c5295d49acaf
user: dholland <dholland%NetBSD.org@localhost>
date: Sat Jun 11 06:58:42 2016 +0000
description:
PR 51200 gets in libsa considered harmful: use kgets
diffstat:
sys/arch/amiga/stand/bootblock/boot/main.c | 4 ++--
sys/arch/zaurus/stand/zboot/boot.c | 4 ++--
sys/arch/zaurus/stand/zboot/bootmenu.c | 4 ++--
sys/lib/libsa/getfile.c | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diffs (73 lines):
diff -r 441852c73512 -r c5295d49acaf sys/arch/amiga/stand/bootblock/boot/main.c
--- a/sys/arch/amiga/stand/bootblock/boot/main.c Sat Jun 11 06:57:46 2016 +0000
+++ b/sys/arch/amiga/stand/bootblock/boot/main.c Sat Jun 11 06:58:42 2016 +0000
@@ -1,5 +1,5 @@
/*
- * $NetBSD: main.c,v 1.30 2016/01/04 14:10:15 phx Exp $
+ * $NetBSD: main.c,v 1.31 2016/06/11 07:01:25 dholland Exp $
*
*
* Copyright (c) 1996,1999 Ignatios Souvatzis
@@ -164,7 +164,7 @@
printf("\n");
printf("Boot: [%s] ", kernel_name);
- gets(linebuf);
+ kgets(linebuf, sizeof(linebuf));
if (*linebuf == 'q')
return 1;
diff -r 441852c73512 -r c5295d49acaf sys/arch/zaurus/stand/zboot/boot.c
--- a/sys/arch/zaurus/stand/zboot/boot.c Sat Jun 11 06:57:46 2016 +0000
+++ b/sys/arch/zaurus/stand/zboot/boot.c Sat Jun 11 06:58:42 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: boot.c,v 1.7 2016/05/31 04:13:26 dholland Exp $ */
+/* $NetBSD: boot.c,v 1.8 2016/06/11 06:58:42 dholland Exp $ */
/*
* Copyright (c) 2009 NONAKA Kimihiro <nonaka%netbsd.org@localhost>
@@ -416,7 +416,7 @@
input[0] = '\0';
printf("> ");
- gets(input);
+ kgets(input, sizeof(input));
/*
* Skip leading whitespace.
diff -r 441852c73512 -r c5295d49acaf sys/arch/zaurus/stand/zboot/bootmenu.c
--- a/sys/arch/zaurus/stand/zboot/bootmenu.c Sat Jun 11 06:57:46 2016 +0000
+++ b/sys/arch/zaurus/stand/zboot/bootmenu.c Sat Jun 11 06:58:42 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bootmenu.c,v 1.4 2014/08/10 07:40:50 isaki Exp $ */
+/* $NetBSD: bootmenu.c,v 1.5 2016/06/11 06:58:42 dholland Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -99,7 +99,7 @@
printf("\nOption: [%d]:",
bootcfg_info.def + 1);
- gets(input);
+ kgets(input, sizeof(input));
choice = getchoicefrominput(input, bootcfg_info.def);
} else if (bootcfg_info.timeout == 0)
choice = bootcfg_info.def;
diff -r 441852c73512 -r c5295d49acaf sys/lib/libsa/getfile.c
--- a/sys/lib/libsa/getfile.c Sat Jun 11 06:57:46 2016 +0000
+++ b/sys/lib/libsa/getfile.c Sat Jun 11 06:58:42 2016 +0000
@@ -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 @@
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);
Home |
Main Index |
Thread Index |
Old Index