diff options
Diffstat (limited to 'usr.sbin/ppp/modem.c')
-rw-r--r-- | usr.sbin/ppp/modem.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ppp/modem.c b/usr.sbin/ppp/modem.c index 8a8bb140fc1..e92a3b719d0 100644 --- a/usr.sbin/ppp/modem.c +++ b/usr.sbin/ppp/modem.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: modem.c,v 1.1 1997/11/23 20:27:35 brian Exp $ + * $Id: modem.c,v 1.2 1997/12/18 01:10:26 brian Exp $ * * TODO: */ @@ -680,7 +680,8 @@ HangupModem(int flag) if (modem >= 0) { char ScriptBuffer[SCRIPT_LEN]; - strcpy(ScriptBuffer, VarHangupScript); /* arrays are the same size */ + strncpy(ScriptBuffer, VarHangupScript, sizeof(ScriptBuffer)); + ScriptBuffer[sizeof(ScriptBuffer) - 1] = '\0'; LogPrintf(LogDEBUG, "HangupModem: Script: %s\n", ScriptBuffer); if (flag || !(mode & MODE_DEDICATED)) { DoChat(ScriptBuffer); |