]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
commit bash-20110916 snapshot
authorChet Ramey <chet.ramey@case.edu>
Mon, 9 Jan 2012 13:28:12 +0000 (08:28 -0500)
committerChet Ramey <chet.ramey@case.edu>
Mon, 9 Jan 2012 13:28:12 +0000 (08:28 -0500)
CWRU/CWRU.chlog
builtins/declare.def
builtins/read.def
doc/bash.1
doc/bashref.texi
doc/version.texi

index e627c32e0581663ef8828a099f7f7c4895bff8c4..5e0b3a9cc0f926ff48769f042cf48bf848328bcd 100644 (file)
@@ -12179,3 +12179,11 @@ bashline.c
        - bash_filename_stat_hook: new function, designed to expand variable
          references in filenames before readline passes them to stat(2)
          to determine whether or not they are a directory
+
+                                  9/15
+                                  ----
+builtins/declare.def
+       - if assign_array_element fails due to a bad (or empty) subscript, mark
+         it as an assignment error and don't attempt any further processing
+         of that declaration.  Fixes segfault bug reported by Diego Augusto
+         Molina <diegoaugustomolina@gmail.com>
index 55206fa79b63c5644c35c136912696294aa20feb..8b9b850ccd0867effd662d0e6f0affecd895454b 100644 (file)
@@ -513,6 +513,11 @@ declare_internal (list, local_var)
              *subscript_start = '[';   /* ] */
              var = assign_array_element (name, value, 0);      /* XXX - not aflags */
              *subscript_start = '\0';
+             if (var == 0)     /* some kind of assignment error */
+               {
+                 assign_error++;
+                 NEXT_VARIABLE ();
+               }
            }
          else if (simple_array_assign)
            {
index 9e9da523a12cbd49b537970926d57a24e14af20c..41757c0c89b828a404c9e92be44fc21d6ce3ef72 100644 (file)
@@ -53,8 +53,9 @@ Options:
   -t timeout   time out and return failure if a complete line of input is
                not read withint TIMEOUT seconds.  The value of the TMOUT
                variable is the default timeout.  TIMEOUT may be a
-               fractional number.  If TIMEOUT is 0, read returns success only
-               if input is available on the specified file descriptor.  The
+               fractional number.  If TIMEOUT is 0, read returns immediately,
+               without trying to read any data, returning success only if
+               input is available on the specified file descriptor.  The
                exit status is greater than 128 if the timeout is exceeded
   -u fd                read from file descriptor FD instead of the standard input
 
index 57f5a5ac6ba098dc2331d0780b9ce0ecde584329..4be04a6c7a257bd4a0dccc71d14b75e247d3c3d2 100644 (file)
@@ -5,12 +5,12 @@
 .\"    Case Western Reserve University
 .\"    chet@po.cwru.edu
 .\"
-.\"    Last Change: Thu Sep  8 09:39:24 EDT 2011
+.\"    Last Change: Fri Sep 16 08:43:45 EDT 2011
 .\"
 .\" bash_builtins, strip all but Built-Ins section
 .if \n(zZ=1 .ig zZ
 .if \n(zY=1 .ig zY
-.TH BASH 1 "2011 September 8" "GNU Bash 4.2"
+.TH BASH 1 "2011 September 16" "GNU Bash 4.2"
 .\"
 .\" There's some problem with having a `@'
 .\" in a tagged paragraph with the BSD man macros.
@@ -8394,8 +8394,9 @@ the decimal point.
 This option is only effective if \fBread\fP is reading input from a
 terminal, pipe, or other special file; it has no effect when reading
 from regular files.
-If \fItimeout\fP is 0, \fBread\fP returns success if input is available on
-the specified file descriptor, failure otherwise.
+If \fItimeout\fP is 0, \fBread\fP returns immediately, without trying to
+read any data.  The exit statis is 0 if input is available on
+the specified file descriptor, non-zero otherwise.
 The exit status is greater than 128 if the timeout is exceeded.
 .TP
 .B \-u \fIfd\fP
index 814623bf5f663295fdc615ecb8e77de11a69832c..79fd38ffac3078d2cc377c8d265ef711306bbe92 100644 (file)
@@ -3970,8 +3970,9 @@ the decimal point.
 This option is only effective if @code{read} is reading input from a
 terminal, pipe, or other special file; it has no effect when reading
 from regular files.
-If @var{timeout} is 0, @code{read} returns success if input is available on
-the specified file descriptor, failure otherwise.
+If @var{timeout} is 0, @code{read} returns immediately, without trying to
+read and data.  The exit status is 0 if input is available on
+the specified file descriptor, non-zero otherwise.
 The exit status is greater than 128 if the timeout is exceeded.
 
 @item -u @var{fd}
index 55c1c660cba66d7d38987862c0503a660c3c7bc4..15784c9a99d398ffd7cb48e7bf065988b4ec64ff 100644 (file)
@@ -2,9 +2,9 @@
 Copyright (C) 1988-2011 Free Software Foundation, Inc.
 @end ignore
 
-@set LASTCHANGE Thu Sep  8 09:39:10 EDT 2011
+@set LASTCHANGE Fri Sep 16 08:44:02 EDT 2011
 
 @set EDITION 4.2
 @set VERSION 4.2
-@set UPDATED 8 September 2011
+@set UPDATED 16 September 2011
 @set UPDATED-MONTH September 2011