From: Ted Lemon Date: Wed, 10 Mar 1999 23:47:39 +0000 (+0000) Subject: Allocate space for NUL terminator. X-Git-Tag: V3-ALPHA-19990315~38 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c6ccf156ac9248ac040b3ad08ece3b4af1186e4a;p=thirdparty%2Fdhcp.git Allocate space for NUL terminator. --- diff --git a/client/clparse.c b/client/clparse.c index 3736acdd7..e4ca4d79c 100644 --- a/client/clparse.c +++ b/client/clparse.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: clparse.c,v 1.25 1999/03/09 23:38:37 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n"; +"$Id: clparse.c,v 1.26 1999/03/10 23:47:39 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -541,7 +541,7 @@ void parse_option_list (cfile, list) } if (*list) dfree (*list, "parse_option_list"); - *list = dmalloc (ix * sizeof **list, "parse_option_list"); + *list = dmalloc ((ix + 1) * sizeof **list, "parse_option_list"); if (!*list) log_error ("no memory for option list."); else {