diff options
author | 2007-09-02 15:19:07 +0000 | |
---|---|---|
committer | 2007-09-02 15:19:07 +0000 | |
commit | 1ed98fdf61d9dd29369f246109081408082ce54d (patch) | |
tree | ad7631e58c83830d1fc51cbadb9a2da53c1abfb7 /usr.sbin/pppd/main.c | |
parent | OpenCVS server init-support with OpenCVS and GNU cvs clients. (diff) | |
download | wireguard-openbsd-1ed98fdf61d9dd29369f246109081408082ce54d.tar.xz wireguard-openbsd-1ed98fdf61d9dd29369f246109081408082ce54d.zip |
use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsg
Diffstat (limited to 'usr.sbin/pppd/main.c')
-rw-r--r-- | usr.sbin/pppd/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/pppd/main.c b/usr.sbin/pppd/main.c index ac35acb366a..5703590365c 100644 --- a/usr.sbin/pppd/main.c +++ b/usr.sbin/pppd/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.46 2007/06/04 14:59:45 henning Exp $ */ +/* $OpenBSD: main.c,v 1.47 2007/09/02 15:19:39 deraadt Exp $ */ /* * main.c - Point-to-Point Protocol main module @@ -46,7 +46,7 @@ #if 0 static char rcsid[] = "Id: main.c,v 1.49 1998/05/05 05:24:17 paulus Exp $"; #else -static char rcsid[] = "$OpenBSD: main.c,v 1.46 2007/06/04 14:59:45 henning Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.47 2007/09/02 15:19:39 deraadt Exp $"; #endif #endif @@ -1657,7 +1657,7 @@ script_setenv(var, value) } } else { i = 0; - script_env = (char **) malloc(16 * sizeof(char *)); + script_env = (char **) calloc(16, sizeof(char *)); if (script_env == 0) novm("script_setenv"); s_env_nalloc = 16; |