mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Avoid some buffer overrun problems.
This commit is contained in:
parent
cbf5d94928
commit
053edb3c0c
2 changed files with 7 additions and 7 deletions
|
|
@ -18,7 +18,7 @@
|
|||
* Columbus, OH 43221
|
||||
* (614)451-1883
|
||||
*
|
||||
* $Id: chat.c,v 1.10 1996/05/11 20:48:20 phk Exp $
|
||||
* $Id: chat.c,v 1.11 1996/06/09 20:40:56 ache Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Support more UUCP compatible control sequences.
|
||||
|
|
@ -377,7 +377,7 @@ char *command, *out;
|
|||
}
|
||||
cp--;
|
||||
}
|
||||
sprintf(tmp, "%s %s", command, cp);
|
||||
snprintf(tmp, sizeof tmp, "%s %s", command, cp);
|
||||
(void) MakeArgs(tmp, &vector);
|
||||
|
||||
pipe(fids);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: systems.c,v 1.5 1995/05/30 03:50:58 rgrimes Exp $
|
||||
* $Id: systems.c,v 1.6 1996/03/08 09:03:09 ache Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
|
|
@ -75,12 +75,12 @@ char *file;
|
|||
cp = getenv("HOME");
|
||||
if (cp) {
|
||||
SetUserId();
|
||||
sprintf(line, "%s/.%s", cp, file);
|
||||
snprintf(line, sizeof line, "%s/.%s", cp, file);
|
||||
fp = fopen(line, "r");
|
||||
}
|
||||
if (fp == NULL) {
|
||||
SetPppId();
|
||||
sprintf(line, "%s/%s",_PATH_PPP, file);
|
||||
snprintf(line, sizeof line, "%s/%s", _PATH_PPP, file);
|
||||
fp = fopen(line, "r");
|
||||
}
|
||||
if (fp == NULL) {
|
||||
|
|
@ -115,12 +115,12 @@ char *file;
|
|||
cp = getenv("HOME");
|
||||
if (cp) {
|
||||
SetUserId();
|
||||
sprintf(line, "%s/.%s", cp, file);
|
||||
snprintf(line, sizeof line, "%s/.%s", cp, file);
|
||||
fp = fopen(line, "r");
|
||||
}
|
||||
if (fp == NULL) {
|
||||
SetPppId(); /* fix from pdp@ark.jr3uom.iijnet.or.jp */
|
||||
sprintf(line, "%s/%s",_PATH_PPP, file);
|
||||
snprintf(line, sizeof line, "%s/%s", _PATH_PPP, file);
|
||||
fp = fopen(line, "r");
|
||||
}
|
||||
if (fp == NULL) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue