From aaf0d879627111733a4b12bd01f26cb634c211c7e1ca0d311adceee061bb0bf4 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 29 Jul 2010 15:19:39 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=46 --- bash-4.1-array.dif | 24 ++++++++++++++++++++++++ bash.changes | 5 +++++ 2 files changed, 29 insertions(+) diff --git a/bash-4.1-array.dif b/bash-4.1-array.dif index 82f3578..3f9f734 100644 --- a/bash-4.1-array.dif +++ b/bash-4.1-array.dif @@ -16,3 +16,27 @@ And the obvious patch: else bind_array_variable (name, 0, value, aflags); } +Roman Rakus writes: +> Repeated in the bash-4.0.38 and bash-4.1.7 by the script; +> #!/bin/bash +> +> typeset -Ai s +> y='*' +> z='[' +> s[$y]=1 +> s[$z]=2 +> (( s[$z] = s[$z] + ${s[$y]} )) +> (( s[$y] = s[$y] + ${s[$z]} )) +> [[ ${s[$y]} = 4 ]] && echo "ok" + +--- variables.c ++++ variables.c 2010-07-29 15:03:48.671425922 +0000 +@@ -2398,7 +2398,7 @@ bind_int_variable (lhs, rhs) + #endif + v = bind_variable (lhs, rhs, 0); + +- if (isint) ++ if (isint && v) + VSETATTR (v, att_integer); + + return (v); diff --git a/bash.changes b/bash.changes index 5719dee..4bdb282 100644 --- a/bash.changes +++ b/bash.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 29 17:06:51 CEST 2010 - werner@suse.de + +- Add fix from mailing list to avoid crash + ------------------------------------------------------------------- Mon Jul 19 09:54:50 CEST 2010 - werner@suse.de