7 Bug-Reported-by: jared r r spiegel <jrrs@iorek.ice-nine.org>
8 Bug-Reference-ID: <200801152201.m0FM1lDp021260@iorek.ice-nine.org>
9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2008-01/msg00049.html
13 Bash inappropriately evaluates command substitutions while expanding
14 directory names as part of command substitution.
18 *** ../bash-3.2-patched/subst.c 2007-12-13 22:31:21.000000000 -0500
19 --- bash-3.2/subst.c 2008-01-17 22:48:15.000000000 -0500
22 to jump_to_top_level here so we don't endlessly loop. */
24 ! expand_prompt_string (string, quoted)
30 to jump_to_top_level here so we don't endlessly loop. */
32 ! expand_prompt_string (string, quoted, wflags)
40 return ((WORD_LIST *)NULL);
43 td.word = savestring (string);
46 return ((WORD_LIST *)NULL);
49 td.word = savestring (string);
51 *** ../bash-3.2-patched/subst.h 2007-03-24 14:51:05.000000000 -0400
52 --- bash-3.2/subst.h 2008-01-17 22:46:08.000000000 -0500
56 /* Expand a prompt string. */
57 ! extern WORD_LIST *expand_prompt_string __P((char *, int));
59 /* Expand STRING just as if you were expanding a word. This also returns
62 /* Expand a prompt string. */
63 ! extern WORD_LIST *expand_prompt_string __P((char *, int, int));
65 /* Expand STRING just as if you were expanding a word. This also returns
66 *** ../bash-3.2-patched/parse.y 2007-08-25 13:47:06.000000000 -0400
67 --- bash-3.2/parse.y 2008-01-17 22:46:30.000000000 -0500
71 last_exit_value = last_command_exit_value;
72 ! list = expand_prompt_string (result, Q_DOUBLE_QUOTES);
74 result = string_list (list);
77 last_exit_value = last_command_exit_value;
78 ! list = expand_prompt_string (result, Q_DOUBLE_QUOTES, 0);
80 result = string_list (list);
81 *** ../bash-3.2-patched/bashline.c 2006-07-29 16:39:30.000000000 -0400
82 --- bash-3.2/bashline.c 2008-02-17 12:53:42.000000000 -0500
86 new_dirname = savestring (local_dirname);
87 ! wl = expand_prompt_string (new_dirname, 0); /* does the right thing */
92 new_dirname = savestring (local_dirname);
93 ! wl = expand_prompt_string (new_dirname, 0, W_NOCOMSUB); /* does the right thing */
96 *** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006
97 --- bash-3.2/patchlevel.h Mon Oct 16 14:22:54 2006
100 looks for to find the patch level (for the sccs version string). */
102 ! #define PATCHLEVEL 36
104 #endif /* _PATCHLEVEL_H_ */
106 looks for to find the patch level (for the sccs version string). */
108 ! #define PATCHLEVEL 37
110 #endif /* _PATCHLEVEL_H_ */