[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[BTS#383762] Re: Bash segfaults with user input



> Package: bash
> Version: 3.1-5
> Severity: important

> $ bash -o history
> Segmentation fault (core dumped)
> $ file ./core
> ./core: ELF 64-bit LSB core file AMD x86-64, version 1 (SYSV),
> SVR4-style, from 'bash'
Hi

I have the same error.

$ file core
ELF 32-bit LSB core file Intel 80386, version 1 (SYSV), SVR4-style

It's fixed in bash 3.2
http://ftp.gnu.org/gnu/bash/bash-3.2.tar.gz

Attached a patch from that version.

Cheers,
Javi.
--- bashhist.c	2005-10-01 04:30:52.000000000 +0200
+++ bashhist.c~	2007-03-11 14:21:56.000000000 +0100
@@ -270,6 +270,9 @@
      Note that the history file is automatically truncated to the
      size of HISTSIZE if the user does not explicitly set the size
      differently. */
+  set_if_not ("HISTSIZE", "500");
+  sv_histsize ("HISTSIZE");
+
   set_if_not ("HISTFILESIZE", get_string_value ("HISTSIZE"));
   sv_histsize ("HISTFILESIZE");
 

Reply to: