From 0b86398ff87a54cce9aa066b9ae16d844bc49c60 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Thu, 14 Jul 2005 20:49:35 +0000 Subject: [PATCH] Code cleanup --- lib/client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/client.c b/lib/client.c index b582c0e5..073bb06a 100644 --- a/lib/client.c +++ b/lib/client.c @@ -4,7 +4,7 @@ * Purpose ...............: MBSE Deamon Client * ***************************************************************************** - * Copyright (C) 1993-2004 + * Copyright (C) 1993-2005 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -102,7 +102,7 @@ int socket_connect(char *user, char *prg, char *city) * information to tell the server who we are. */ if (isatty(1) && (ttyname(1) != NULL)) { - strcpy(tty, ttyname(1)); + strncpy(tty, ttyname(1), sizeof(tty)-1); if (strchr(tty, 'p')) memccpy(tty, index(tty, 'p'), '\0', strlen(tty)); else if (strchr(tty, 't'))