|
Roman Rakus |
245501 |
BASH PATCH REPORT
|
|
Roman Rakus |
245501 |
=================
|
|
Roman Rakus |
245501 |
|
|
Roman Rakus |
245501 |
Bash-Release: 4.0
|
|
Roman Rakus |
245501 |
Patch-ID: bash40-005
|
|
Roman Rakus |
245501 |
|
|
Roman Rakus |
245501 |
Bug-Reported-by: Pierre Gaston <pierre.gaston@gmail.com>
|
|
Roman Rakus |
245501 |
Bug-Reference-ID: <c440c9800902242338n69f594a4nd66b8748def9cf18@mail.gmail.com>
|
|
Roman Rakus |
245501 |
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00206.html
|
|
Roman Rakus |
245501 |
|
|
Roman Rakus |
245501 |
Bug-Description:
|
|
Roman Rakus |
245501 |
|
|
Roman Rakus |
245501 |
The `declare' builtin dumped core when attempting to assign associative
|
|
Roman Rakus |
245501 |
array indices containing some special characters, even when they were
|
|
Roman Rakus |
245501 |
quoted before being expanded.
|
|
Roman Rakus |
245501 |
|
|
Roman Rakus |
245501 |
Patch:
|
|
Roman Rakus |
245501 |
|
|
Roman Rakus |
245501 |
*** ../bash-4.0/builtins/declare.def 2009-01-04 14:32:22.000000000 -0500
|
|
Roman Rakus |
245501 |
--- builtins/declare.def 2009-02-26 11:40:16.000000000 -0500
|
|
Roman Rakus |
245501 |
***************
|
|
Roman Rakus |
245501 |
*** 296,299 ****
|
|
Roman Rakus |
245501 |
--- 296,306 ----
|
|
Roman Rakus |
245501 |
if (t = strchr (name, '[')) /* ] */
|
|
Roman Rakus |
245501 |
{
|
|
Roman Rakus |
245501 |
+ /* If offset != 0 we have already validated any array reference */
|
|
Roman Rakus |
245501 |
+ if (offset == 0 && valid_array_reference (name) == 0)
|
|
Roman Rakus |
245501 |
+ {
|
|
Roman Rakus |
245501 |
+ sh_invalidid (name);
|
|
Roman Rakus |
245501 |
+ assign_error++;
|
|
Roman Rakus |
245501 |
+ NEXT_VARIABLE ();
|
|
Roman Rakus |
245501 |
+ }
|
|
Roman Rakus |
245501 |
subscript_start = t;
|
|
Roman Rakus |
245501 |
*t = '\0';
|
|
Roman Rakus |
245501 |
***************
|
|
Roman Rakus |
245501 |
*** 485,489 ****
|
|
Roman Rakus |
245501 |
/* declare -a name[[n]] or declare name[n] makes name an indexed
|
|
Roman Rakus |
245501 |
array variable. */
|
|
Roman Rakus |
245501 |
! else if ((making_array_special || (flags_on & att_array)) && array_p (var) == 0)
|
|
Roman Rakus |
245501 |
var = convert_var_to_array (var);
|
|
Roman Rakus |
245501 |
#endif /* ARRAY_VARS */
|
|
Roman Rakus |
245501 |
--- 492,496 ----
|
|
Roman Rakus |
245501 |
/* declare -a name[[n]] or declare name[n] makes name an indexed
|
|
Roman Rakus |
245501 |
array variable. */
|
|
Roman Rakus |
245501 |
! else if ((making_array_special || (flags_on & att_array)) && array_p (var) == 0 && assoc_p (var) == 0)
|
|
Roman Rakus |
245501 |
var = convert_var_to_array (var);
|
|
Roman Rakus |
245501 |
#endif /* ARRAY_VARS */
|
|
Roman Rakus |
245501 |
*** ../bash-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500
|
|
Roman Rakus |
245501 |
--- patchlevel.h 2009-02-22 16:11:31.000000000 -0500
|
|
Roman Rakus |
245501 |
***************
|
|
Roman Rakus |
245501 |
*** 26,30 ****
|
|
Roman Rakus |
245501 |
looks for to find the patch level (for the sccs version string). */
|
|
Roman Rakus |
245501 |
|
|
Roman Rakus |
245501 |
! #define PATCHLEVEL 4
|
|
Roman Rakus |
245501 |
|
|
Roman Rakus |
245501 |
#endif /* _PATCHLEVEL_H_ */
|
|
Roman Rakus |
245501 |
--- 26,30 ----
|
|
Roman Rakus |
245501 |
looks for to find the patch level (for the sccs version string). */
|
|
Roman Rakus |
245501 |
|
|
Roman Rakus |
245501 |
! #define PATCHLEVEL 5
|
|
Roman Rakus |
245501 |
|
|
Roman Rakus |
245501 |
#endif /* _PATCHLEVEL_H_ */
|
|
Roman Rakus |
245501 |
|