]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Allocate space for NUL terminator.
authorTed Lemon <source@isc.org>
Wed, 10 Mar 1999 23:47:39 +0000 (23:47 +0000)
committerTed Lemon <source@isc.org>
Wed, 10 Mar 1999 23:47:39 +0000 (23:47 +0000)
client/clparse.c

index 3736acdd7bc5c34fad069e300fc2a9eacead0599..e4ca4d79c1d755766c3cc04ada5d1b8581fb9abc 100644 (file)
@@ -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 {