diff -r b773b241e233 -r 98867eee9779 src/protocols/zephyr/ZLocations.c --- a/src/protocols/zephyr/ZLocations.c Tue May 03 02:39:55 2005 +0000 +++ b/src/protocols/zephyr/ZLocations.c Tue May 03 02:52:39 2005 +0000 @@ -97,20 +97,20 @@ #ifndef X_DISPLAY_MISSING if ((display = getenv("DISPLAY")) && *display) { (void) strncpy(mytty, display, sizeof(mytty)); - mytty[sizeof(mytty)-1] = '\0'; } else { #endif #ifdef WIN32 - strcpy(mytty,"WinGaim"); + strncpy(mytty, "WinGaim", sizeof(mytty)); #else ttyp = ttyname(0); if (ttyp && *ttyp) { p = strchr(ttyp + 1, '/'); strcpy(mytty, (p) ? p + 1 : ttyp); } else { - strcpy(mytty, "unknown"); + strncpy(mytty, "unknown", sizeof(mytty)); } #endif + mytty[sizeof(mytty)-1] = '\0'; #ifndef X_DISPLAY_MISSING } #endif