From 5b7589eb27e748a3d281c0341219cf7435e8b4f1 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sun, 26 Apr 2009 11:25:19 +0000 Subject: hush: fix SEGV in % expansion function old new delta expand_variables 2203 2217 +14 --- shell/hush_test/hush-arith/arith.right | 6 +++--- shell/hush_test/hush-vars/var_posix1.right | 1 + shell/hush_test/hush-vars/var_posix1.tests | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'shell/hush_test') diff --git a/shell/hush_test/hush-arith/arith.right b/shell/hush_test/hush-arith/arith.right index 8cde0ee53..83155fb03 100644 --- a/shell/hush_test/hush-arith/arith.right +++ b/shell/hush_test/hush-arith/arith.right @@ -63,9 +63,9 @@ hush: error in arithmetic 40 40 hush: error in arithmetic hush: divide by 0 -hush: can't exec 'let': No such file or directory +hush: can't execute 'let': No such file or directory hush: error in arithmetic -hush: can't exec 'let': No such file or directory +hush: can't execute 'let': No such file or directory abc def ghi @@ -135,4 +135,4 @@ hush: error in arithmetic 42 42 42 -hush: can't exec 'a[b[c]d]=e': No such file or directory +hush: can't execute 'a[b[c]d]=e': No such file or directory diff --git a/shell/hush_test/hush-vars/var_posix1.right b/shell/hush_test/hush-vars/var_posix1.right index 47d52a6c2..e6cba2758 100644 --- a/shell/hush_test/hush-vars/var_posix1.right +++ b/shell/hush_test/hush-vars/var_posix1.right @@ -32,4 +32,5 @@ ababcdc ababcdcd Empty: ababcdcd}_tail +ababcdcd end diff --git a/shell/hush_test/hush-vars/var_posix1.tests b/shell/hush_test/hush-vars/var_posix1.tests index 3069360e1..c1f64094d 100755 --- a/shell/hush_test/hush-vars/var_posix1.tests +++ b/shell/hush_test/hush-vars/var_posix1.tests @@ -43,5 +43,6 @@ echo ${var%*} echo Empty:${var%%*} echo ${var#}}_tail # UNFIXED BUG: echo ${var#\}}_tail +echo ${var%\\*} echo end -- cgit v1.2.3