On 13.02.2015 10:18, Bruce Evans wrote: > if (arg > RLIM_INFINITY) > err(...);
Checking for RLIM_INFINITY is wrong here, since it is ulong long max, considering arg = va_arg(ap, long); and ulimit(3) stating that arg is always plain long. Proper check will be if (arg < 0) { errno = EINVAL; return (-1); } if (arg > LONG_MAX / 512) arg = LONG_MAX / 512; That all. In pure theoretical case RLIM_INFINITY is less than LONG_MAX, it is job of underlying setrlimit(2) to return error. -- http://ache.vniz.net/ _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"