bash/bash-4.1-bind_int_variable.patch
Roman Rakus 0a8ef715f0 Don't segfault when trying to bind int variable to array
with bad array subsrcipt.
Resolves: #618289

Signed-off-by: Roman Rakus <rrakus@redhat.com>
2010-12-01 17:26:56 +01:00

13 lines
360 B
Diff

diff -up bash-4.1/variables.c.Ai bash-4.1/variables.c
--- bash-4.1/variables.c.Ai 2010-07-28 08:42:54.000000000 +0200
+++ bash-4.1/variables.c 2010-07-28 08:43:17.000000000 +0200
@@ -2371,7 +2371,7 @@ bind_int_variable (lhs, rhs)
#endif
v = bind_variable (lhs, rhs, 0);
- if (isint)
+ if (isint && v)
VSETATTR (v, att_integer);
return (v);