diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2010-09-24 00:00:42 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2010-09-24 00:00:42 +0000 |
commit | 2caa943e41da0e13cfd43716d449696c87cf736e (patch) | |
tree | f24e4d8f01ce29eac9c273daa67e2e463037923f /usr.sbin/nsd | |
parent | b5b0cb7f97e94580a28e79fbe0ecedb947f2e7a9 (diff) |
fix a overflow found by parfait
ok jakob@
Diffstat (limited to 'usr.sbin/nsd')
-rw-r--r-- | usr.sbin/nsd/nsd-checkconf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/nsd/nsd-checkconf.c b/usr.sbin/nsd/nsd-checkconf.c index 19d89396620..8210bc65f91 100644 --- a/usr.sbin/nsd/nsd-checkconf.c +++ b/usr.sbin/nsd/nsd-checkconf.c @@ -77,7 +77,7 @@ underscore(const char *s) { buf[i++] = *j; } j++; - if (i > BUFSIZ) { + if (i >= BUFSIZ) { return NULL; } } @@ -243,6 +243,7 @@ config_print_zone(nsd_options_t* opt, const char* k, const char *o, const char * /* str */ SERV_GET_STR(database, o); SERV_GET_STR(identity, o); + SERV_GET_STR(nsid, o); SERV_GET_STR(logfile, o); SERV_GET_STR(pidfile, o); SERV_GET_STR(chroot, o); @@ -287,6 +288,7 @@ config_test_print_server(nsd_options_t* opt) printf("\thide-version: %s\n", opt->hide_version?"yes":"no"); print_string_var("database:", opt->database); print_string_var("identity:", opt->identity); + print_string_var("nsid:", opt->nsid); print_string_var("logfile:", opt->logfile); printf("\tserver_count: %d\n", opt->server_count); printf("\ttcp_count: %d\n", opt->tcp_count); |