Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/games/hack games/hack: Revert the strlcpy(1) change since th...
details: https://anonhg.NetBSD.org/src/rev/370312ac8b41
branches: trunk
changeset: 1007134:370312ac8b41
user: fox <fox%NetBSD.org@localhost>
date: Fri Feb 07 22:04:02 2020 +0000
description:
games/hack: Revert the strlcpy(1) change since this changes expected behavior from strncpy(3).
Reviewed by: kamil@
diffstat:
games/hack/hack.end.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r d7e2921dba94 -r 370312ac8b41 games/hack/hack.end.c
--- a/games/hack/hack.end.c Fri Feb 07 21:53:20 2020 +0000
+++ b/games/hack/hack.end.c Fri Feb 07 22:04:02 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.end.c,v 1.18 2020/02/07 20:34:18 fox Exp $ */
+/* $NetBSD: hack.end.c,v 1.19 2020/02/07 22:04:02 fox Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.end.c,v 1.18 2020/02/07 20:34:18 fox Exp $");
+__RCSID("$NetBSD: hack.end.c,v 1.19 2020/02/07 22:04:02 fox Exp $");
#endif /* not lint */
#include <signal.h>
@@ -362,7 +362,7 @@
t0->plchar = pl_character[0];
t0->sex = (flags.female ? 'F' : 'M');
t0->uid = uid;
- (void) strlcpy(t0->name, plname, NAMSZ);
+ (void) strncpy(t0->name, plname, NAMSZ);
(t0->name)[NAMSZ] = 0;
(void) strncpy(t0->death, killer, DTHSZ);
(t0->death)[DTHSZ] = 0;
Home |
Main Index |
Thread Index |
Old Index