diff options
author | Chet Ramey <chet.ramey@case.edu> | 2012-07-10 09:44:07 -0400 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2012-07-10 09:44:07 -0400 |
commit | a601c7490294ca417adf657bbe06c83a18e0c4c8 (patch) | |
tree | 9345786a2d2cd1a73968ceb619ff67ae8dfba3ec /subst.c | |
parent | 7a127e743dce04c760155ea184dad81cf6e02f1d (diff) | |
download | android_external_bash-a601c7490294ca417adf657bbe06c83a18e0c4c8.tar.gz android_external_bash-a601c7490294ca417adf657bbe06c83a18e0c4c8.tar.bz2 android_external_bash-a601c7490294ca417adf657bbe06c83a18e0c4c8.zip |
Bash-4.2 patch 32
Diffstat (limited to 'subst.c')
-rw-r--r-- | subst.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -8151,6 +8151,14 @@ add_string: temp = tword->word; dispose_word_desc (tword); + /* Kill quoted nulls; we will add them back at the end of + expand_word_internal if nothing else in the string */ + if (had_quoted_null && temp && QUOTED_NULL (temp)) + { + FREE (temp); + temp = (char *)NULL; + } + goto add_string; break; @@ -8555,7 +8563,7 @@ finished_with_string: tword->flags |= W_NOEXPAND; /* XXX */ if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) tword->flags |= W_QUOTED; - if (had_quoted_null) + if (had_quoted_null && QUOTED_NULL (istring)) tword->flags |= W_HASQUOTEDNULL; list = make_word_list (tword, (WORD_LIST *)NULL); } @@ -8586,7 +8594,7 @@ finished_with_string: tword->flags |= W_NOGLOB; if (word->flags & W_NOEXPAND) tword->flags |= W_NOEXPAND; - if (had_quoted_null) + if (had_quoted_null && QUOTED_NULL (istring)) tword->flags |= W_HASQUOTEDNULL; /* XXX */ list = make_word_list (tword, (WORD_LIST *)NULL); } |