summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-13 10:50:32 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-13 10:50:32 +0900
commit1274e49054dd920222ecb519f26302a1e023ae35 (patch)
tree62792c6eea4ded3b5704d9852989ba1b306b44bc
parent131db2b394e249037887dc211c3ed63a02616a62 (diff)
downloaddash-1274e49054dd920222ecb519f26302a1e023ae35.tar.gz
dash-1274e49054dd920222ecb519f26302a1e023ae35.tar.bz2
dash-1274e49054dd920222ecb519f26302a1e023ae35.zip
Imported Upstream version 0.5.11.5upstream/0.5.11.5upstream
-rwxr-xr-xconfigure20
-rw-r--r--configure.ac2
-rw-r--r--src/parser.c5
-rw-r--r--src/parser.h1
4 files changed, 16 insertions, 12 deletions
diff --git a/configure b/configure
index cbe68fd..2a7beb6 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for dash 0.5.11.4.
+# Generated by GNU Autoconf 2.69 for dash 0.5.11.5.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='dash'
PACKAGE_TARNAME='dash'
-PACKAGE_VERSION='0.5.11.4'
-PACKAGE_STRING='dash 0.5.11.4'
+PACKAGE_VERSION='0.5.11.5'
+PACKAGE_STRING='dash 0.5.11.5'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1281,7 +1281,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures dash 0.5.11.4 to adapt to many kinds of systems.
+\`configure' configures dash 0.5.11.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1348,7 +1348,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of dash 0.5.11.4:";;
+ short | recursive ) echo "Configuration of dash 0.5.11.5:";;
esac
cat <<\_ACEOF
@@ -1451,7 +1451,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-dash configure 0.5.11.4
+dash configure 0.5.11.5
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2045,7 +2045,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by dash $as_me 0.5.11.4, which was
+It was created by dash $as_me 0.5.11.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2908,7 +2908,7 @@ fi
# Define the identity of the package.
PACKAGE='dash'
- VERSION='0.5.11.4'
+ VERSION='0.5.11.5'
cat >>confdefs.h <<_ACEOF
@@ -5523,7 +5523,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by dash $as_me 0.5.11.4, which was
+This file was extended by dash $as_me 0.5.11.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5589,7 +5589,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-dash config.status 0.5.11.4
+dash config.status 0.5.11.5
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index d06b904..2a31251 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([dash],[0.5.11.4])
+AC_INIT([dash],[0.5.11.5])
AM_INIT_AUTOMAKE([foreign subdir-objects])
AC_CONFIG_SRCDIR([src/main.c])
diff --git a/src/parser.c b/src/parser.c
index a47022e..fc9af07 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -1262,7 +1262,8 @@ varname:
do {
STPUTC(c, out);
c = pgetc_eatbnl();
- } while (!subtype && is_digit(c));
+ } while ((subtype <= 0 || subtype >= VSLENGTH) &&
+ is_digit(c));
} else if (c != '}') {
int cc = c;
@@ -1322,6 +1323,8 @@ varname:
break;
}
} else {
+ if (subtype == VSLENGTH && c != '}')
+ subtype = 0;
badsub:
pungetc();
}
diff --git a/src/parser.h b/src/parser.h
index 524ac1c..7d2749b 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -62,6 +62,7 @@
#define VSTRIMLEFT 0x8 /* ${var#pattern} */
#define VSTRIMLEFTMAX 0x9 /* ${var##pattern} */
#define VSLENGTH 0xa /* ${#var} */
+/* VSLENGTH must come last. */
/* values of checkkwd variable */
#define CHKALIAS 0x1