From owner-svn-src-all@freebsd.org Tue Oct 27 07:08:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99FC4A1E696; Tue, 27 Oct 2015 07:08:48 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6549F1312; Tue, 27 Oct 2015 07:08:48 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9R78lXR090833; Tue, 27 Oct 2015 07:08:47 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9R78lef090832; Tue, 27 Oct 2015 07:08:47 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201510270708.t9R78lef090832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 27 Oct 2015 07:08:47 +0000 (UTC) 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 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2015 07:08:48 -0000 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 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);