aboutsummaryrefslogtreecommitdiffstats
path: root/alias.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2011-11-22 19:11:26 -0500
committerChet Ramey <chet.ramey@case.edu>2011-11-22 19:11:26 -0500
commit495aee441b75276e38c75694ccb455bb6463fdb9 (patch)
treef12907dbf62388e6c65dfa1c5e1199509936707e /alias.c
parent30d188c2932d6ef609d894fefeb7e7b03ccff463 (diff)
downloadandroid_external_bash-495aee441b75276e38c75694ccb455bb6463fdb9.tar.gz
android_external_bash-495aee441b75276e38c75694ccb455bb6463fdb9.tar.bz2
android_external_bash-495aee441b75276e38c75694ccb455bb6463fdb9.zip
Bash-4.2 distribution sources and documentation
Diffstat (limited to 'alias.c')
-rw-r--r--alias.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/alias.c b/alias.c
index 558665e..6c95376 100644
--- a/alias.c
+++ b/alias.c
@@ -319,6 +319,8 @@ skipquotes (string, start)
if (string[i] == '\\')
{
i++; /* skip backslash-quoted quote characters, too */
+ if (string[i] == 0)
+ break;
continue;
}
@@ -364,6 +366,8 @@ skipws (string, start)
if (string[i] == '\\')
{
peekc = string[i+1];
+ if (peekc == 0)
+ break;
if (ISLETTER (peekc))
backslash_quoted_word++; /* this is a backslash-quoted word */
else
@@ -429,6 +433,8 @@ rd_token (string, start)
if (string[i] == '\\')
{
i++; /* skip backslash-escaped character */
+ if (string[i] == 0)
+ break;
continue;
}