From: Anas Nashif Date: Sat, 8 Dec 2012 08:34:12 +0000 (-0800) Subject: applying bash42-028 X-Git-Tag: accepted/trunk/20130318.201842~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c460a071113fe4f4e20760b55619782931ee4a42;p=platform%2Fupstream%2Fbash.git applying bash42-028 --- diff --git a/patchlevel.h b/patchlevel.h index 5e31cd4..a2be105 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -25,6 +25,6 @@ regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh looks for to find the patch level (for the sccs version string). */ -#define PATCHLEVEL 27 +#define PATCHLEVEL 28 #endif /* _PATCHLEVEL_H_ */ diff --git a/subst.c b/subst.c index b6476d8..fa4e5dc 100644 --- a/subst.c +++ b/subst.c @@ -5809,6 +5809,16 @@ parameter_brace_expand_rhs (name, value, c, quoted, qdollaratp, hasdollarat) is the only expansion that creates more than one word. */ if (qdollaratp && ((hasdol && quoted) || l->next)) *qdollaratp = 1; + /* If we have a quoted null result (QUOTED_NULL(temp)) and the word is + a quoted null (l->next == 0 && QUOTED_NULL(l->word->word)), the + flags indicate it (l->word->flags & W_HASQUOTEDNULL), and the + expansion is quoted (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) + (which is more paranoia than anything else), we need to return the + quoted null string and set the flags to indicate it. */ + if (l->next == 0 && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && QUOTED_NULL(temp) && QUOTED_NULL(l->word->word) && (l->word->flags & W_HASQUOTEDNULL)) + { + w->flags |= W_HASQUOTEDNULL; + } dispose_words (l); } else if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && hasdol)