]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Off by one error. From: Chad Loder <cloder@loder.us>
authorHarlan Stenn <stenn@ntp.org>
Wed, 29 Jan 2003 05:27:41 +0000 (00:27 -0500)
committerHarlan Stenn <stenn@ntp.org>
Wed, 29 Jan 2003 05:27:41 +0000 (00:27 -0500)
bk: 3e37664dx5wsoYklDvSlubWTQ0VOMA

ntpd/ntp_config.c

index 289c4fa77d9a5220da75d1741836dfcb5d2a51af..4fa3bc042d2e2d1ed5d932c449cd5ffa99473a2f 100644 (file)
@@ -1801,7 +1801,7 @@ gettokens_netinfo (
                                for (index = 0; index < namelist.ni_namelist_len; index++) {
                                        char *value = namelist.ni_namelist_val[index];
 
-                                       if (! (val_list[index] = (char*)malloc(strlen(value+1))))
+                                       if (! (val_list[index] = (char*)malloc(strlen(value)+1)))
                                                { msyslog(LOG_ERR, "out of memory while configuring"); break; }
 
                                        strcpy(val_list[index], value);