http://bugs.gentoo.org/210110 --- servconf.c +++ servconf.c @@ -690,6 +690,7 @@ { char *cp, **charptr, *arg, *p; int cmdline = 0, *intptr, value, n; + unsigned long lvalue, *longptr; ServerOpCodes opcode; u_short port; u_int i, flags = 0; @@ -704,6 +705,7 @@ if (!arg || !*arg || *arg == '#') return 0; intptr = NULL; + longptr = NULL; charptr = NULL; opcode = parse_token(arg, filename, linenum, &flags); @@ -1421,11 +1423,20 @@ *intptr = value; break; case sBindTimeout: - intptr = (int *) &options->lpk.b_timeout.tv_sec; - goto parse_int; + longptr = (unsigned long *) &options->lpk.b_timeout.tv_sec; +parse_ulong: + arg = strdelim(&cp); + if (!arg || *arg == '\0') + fatal("%s line %d: missing integer value.", + filename, linenum); + lvalue = atol(arg); + if (*activep && *longptr == -1) + *longptr = lvalue; + break; + case sSearchTimeout: - intptr = (int *) &options->lpk.s_timeout.tv_sec; - goto parse_int; + longptr = (unsigned long *) &options->lpk.s_timeout.tv_sec; + goto parse_ulong; break; case sLdapConf: arg = cp;