aboutsummaryrefslogtreecommitdiffstats
path: root/alias.c
diff options
context:
space:
mode:
authorJari Aalto <jari.aalto@cante.net>1998-04-17 19:52:44 +0000
committerJari Aalto <jari.aalto@cante.net>2009-09-12 16:46:51 +0000
commitcce855bc5b117cb7ae70064131120687bc69fac0 (patch)
tree39c7a4ec8f6d22ef03df74f2684e6a04fef10399 /alias.c
parente8ce775db824de329b81293b4e5d8fbd65624528 (diff)
downloadandroid_external_bash-cce855bc5b117cb7ae70064131120687bc69fac0.tar.gz
android_external_bash-cce855bc5b117cb7ae70064131120687bc69fac0.tar.bz2
android_external_bash-cce855bc5b117cb7ae70064131120687bc69fac0.zip
Imported from ../bash-2.02.tar.gz.
Diffstat (limited to 'alias.c')
-rw-r--r--alias.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/alias.c b/alias.c
index d37d1d6..13b7f57 100644
--- a/alias.c
+++ b/alias.c
@@ -24,6 +24,9 @@
#if defined (ALIAS)
#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
# include <unistd.h>
#endif
@@ -411,6 +414,12 @@ rd_token (string, start)
if (quote_char (string[i]))
{
i = skipquotes (string, i);
+ /* This could be a line that contains a single quote character,
+ in which case skipquotes () terminates with string[i] == '\0'
+ (the end of the string). Check for that here. */
+ if (string[i] == '\0')
+ break;
+
/* Now string[i] is the matching quote character, and the
quoted portion of the token has been scanned. */
continue;