On 8/22/12 7:28 AM, [email protected] wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: i686
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-redhat-linux-gnu'
> -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash'
> -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -D_GNU_SOURCE
> -DRECYCLES_PIDS -DDEFAULT_PATH_VALUE='/usr/local/bin:/usr/bin'
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom
> -fasynchronous-unwind-tables
> uname output: Linux windmill 3.5.1-1.fc17.i686.PAE #1 SMP Thu Aug 9 17:50:53
> UTC 2012 i686 i686 i386 GNU/Linux
> Machine Type: i686-redhat-linux-gnu
>
> Bash Version: 4.2
> Patch Level: 36
> Release Status: release
>
> Description:
> segfaults on "while read -sN1 K; do echo $K; done" when baskslash and
> then enter taped twice
Thanks for the report. Try the attached patch; it fixes the problem
for me.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/
*** ../bash-4.2-patched/builtins/read.def 2012-03-11 17:52:44.000000000 -0400
--- builtins/read.def 2012-08-22 11:53:09.000000000 -0400
***************
*** 792,796 ****
#endif
! if (saw_escape)
{
t = dequote_string (input_string);
--- 847,851 ----
#endif
! if (saw_escape && input_string && *input_string)
{
t = dequote_string (input_string);