changeset 10326:72f671a4e153

[gaim-migrate @ 11533] a Zephyr fix from Erik Lee. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Tue, 07 Dec 2004 23:25:15 +0000
parents 1657438d537b
children d88ee1d73a93
files src/protocols/zephyr/ZLocations.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/zephyr/ZLocations.c	Tue Dec 07 04:59:27 2004 +0000
+++ b/src/protocols/zephyr/ZLocations.c	Tue Dec 07 23:25:15 2004 +0000
@@ -5,7 +5,7 @@
  *	Created by:	Robert French
  *
  *	$Source$
- *	$Author: chipx86 $
+ *	$Author: seanegan $
  *
  *	Copyright (c) 1987,1988,1991 by the Massachusetts Institute of Technology.
  *	For copying and distribution information, see the file
@@ -91,7 +91,8 @@
 	    }
 #ifndef X_DISPLAY_MISSING
 	    if ((display = getenv("DISPLAY")) && *display) {
-		    (void) strcpy(mytty, display);
+		    (void) strncpy(mytty, sizeof(mytty), display);
+		    mytty[sizeof(mytty)-1] = '\0';
 	    } else {
 #endif
 		    ttyp = ttyname(0);