Date: Tue, 27 Oct 2015 07:08:47 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290040 - stable/10/usr.bin/timeout Message-ID: <201510270708.t9R78lef090832@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Tue Oct 27 07:08:47 2015 New Revision: 290040 URL: https://svnweb.freebsd.org/changeset/base/290040 Log: MFC: r289878 timeout(1): fix the acceptable range values for parse_signal() Before both 0 and sys_nsig would be successfully returned by parse_signal() although being invalid signal numbers. Submitted by: Alexandre Perrin <alex@kaworu.ch> Modified: stable/10/usr.bin/timeout/timeout.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/timeout/timeout.c ============================================================================== --- stable/10/usr.bin/timeout/timeout.c Tue Oct 27 03:48:42 2015 (r290039) +++ stable/10/usr.bin/timeout/timeout.c Tue Oct 27 07:08:47 2015 (r290040) @@ -105,7 +105,7 @@ parse_signal(const char *str) int sig, i; const char *errstr; - sig = strtonum(str, 0, sys_nsig, &errstr); + sig = strtonum(str, 1, sys_nsig - 1, &errstr); if (errstr == NULL) return (sig);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510270708.t9R78lef090832>