Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Oct 2015 13:47:03 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r289878 - head/usr.bin/timeout
Message-ID:  <201510241347.t9ODl3tP037032@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Sat Oct 24 13:47:03 2015
New Revision: 289878
URL: https://svnweb.freebsd.org/changeset/base/289878

Log:
  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.
  
  PR:		Alexandre Perrin <alex@kaworu.ch>
  MFC after:	3 days
  Differential Revision:	https://reviews.freebsd.org/D3990

Modified:
  head/usr.bin/timeout/timeout.c

Modified: head/usr.bin/timeout/timeout.c
==============================================================================
--- head/usr.bin/timeout/timeout.c	Sat Oct 24 13:45:45 2015	(r289877)
+++ head/usr.bin/timeout/timeout.c	Sat Oct 24 13:47:03 2015	(r289878)
@@ -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?201510241347.t9ODl3tP037032>