summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/systems.c
diff options
context:
space:
mode:
authorpst <pst@FreeBSD.org>1996-12-15 20:39:30 +0000
committerpst <pst@FreeBSD.org>1996-12-15 20:39:30 +0000
commit7f6c21847423b44b057a2cfb319dd1d35ca935bf (patch)
tree4b4edf139101e6a0b72053dca0b43ccaf8063ebe /usr.sbin/ppp/systems.c
parent3f499be2dd9c6fab8e40217504ce60d413aeba68 (diff)
downloadFreeBSD-src-7f6c21847423b44b057a2cfb319dd1d35ca935bf.zip
FreeBSD-src-7f6c21847423b44b057a2cfb319dd1d35ca935bf.tar.gz
Avoid some buffer overrun problems.
Diffstat (limited to 'usr.sbin/ppp/systems.c')
-rw-r--r--usr.sbin/ppp/systems.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ppp/systems.c b/usr.sbin/ppp/systems.c
index eec0c5f..083d7f6 100644
--- a/usr.sbin/ppp/systems.c
+++ b/usr.sbin/ppp/systems.c
@@ -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) {
OpenPOWER on IntegriCloud