[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
builtin "fc -s" with a null string can cause bash to crash
From: |
Jeremy S Bygott |
Subject: |
builtin "fc -s" with a null string can cause bash to crash |
Date: |
Wed, 06 Jun 2001 17:52:18 +0100 |
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu'
-DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -I.
-I/home/swt/doko/export/packages/bash/bash-2.03
-I/home/swt/doko/export/packages/bash/bash-2.03/lib -I/usr/include -g -O2
uname output: Linux debian 2.2.17 #1 Sun Jun 25 09:24:41 EST 2000 i686 unknown
Machine Type: i386-pc-linux-gnu
Bash Version: 2.03
Patch Level: 0
Release Status: release
Description:
The bash builtin command "fc -s PAT=REP" should repeat the
most recent command with PAT replaced by REP. For example,
debian:~$ echo Hello world!
Hello world!
debian:~$ fc -s ello=i
echo Hi world!
Hi world!
It is sometimes okay to use the null string for REP, for
example:
debian:~$ echo Hello world!
Hello world!
debian:~$ fc -s ell=''
echo Ho world!
Ho world!
debian:~$
However, if PAT matches the beginning of the most recent
command and REP is the null string, the shell hangs.
I'm not a shell wizard and this is my first bug report, so I
hope it really is a bug.
Repeat-By:
debian:~$ zzzecho Hello world!
bash: zzzecho: command not found
debian:~$ fc -s zzz=''
The shell should echo the command 'echo Hello world!' and then
execute it. Instead, the shell hangs.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- builtin "fc -s" with a null string can cause bash to crash,
Jeremy S Bygott <=