From "Philippe Charnier" <charnier@lirmm.fr>:
There is a bug in sh: the built in command "fc -l" generates a core dump (*NULL in not_fcnumber). According to the sh manual page (fc -l [-nr] [first [last]]), fc -l is a correct sequence (in that case, values are defaulted to -16 and -1) but fails when first is not given.
This commit is contained in:
parent
9714de6a38
commit
3fb0993969
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8289
@ -33,7 +33,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: histedit.c,v 1.2 1994/09/24 02:57:36 davidg Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -389,6 +389,10 @@ fc_replace(s, p, r)
|
||||
not_fcnumber(s)
|
||||
char *s;
|
||||
{
|
||||
if (s == NULL) {
|
||||
/* NULL is not a fc_number */
|
||||
return (1);
|
||||
}
|
||||
if (*s == '-')
|
||||
s++;
|
||||
return (!is_number(s));
|
||||
|
Loading…
Reference in New Issue
Block a user