nalika / rpms / bash

Forked from rpms/bash 2 years ago
Clone

Blame SOURCES/bash-4.2-brace-expand.patch

07a490
diff --git a/braces.c b/braces.c
07a490
index 2febed7..61c1ab1 100644
07a490
--- a/braces.c
07a490
+++ b/braces.c
07a490
@@ -529,6 +529,11 @@ brace_gobbler (text, tlen, indx, satisfy)
07a490
	{
07a490
	  if (c == quoted)
07a490
	    quoted = 0;
07a490
+#if defined (SHELL)
07a490
+         /* The shell allows quoted command substitutions */
07a490
+         if (quoted == '"' && c == '$' && text[i+1] == '(')    /*)*/
07a490
+           goto comsub;
07a490
+#endif
07a490
	  ADVANCE_CHAR (text, tlen, i);
07a490
	  continue;
07a490
	}
07a490
@@ -551,6 +556,7 @@ brace_gobbler (text, tlen, indx, satisfy)
07a490
       /* Pass new-style command and process substitutions through unchanged. */
07a490
       if ((c == '$' || c == '<' || c == '>') && text[i+1] == '(')			/* ) */
07a490
	{
07a490
+comsub:
07a490
	  si = i + 2;
07a490
	  t = extract_command_subst (text, &si, 0);
07a490
	  i = si;