diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | posix/wordexp-test.c | 3 | ||||
-rw-r--r-- | posix/wordexp.c | 1 |
3 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 7858d6bb17..abb948f36f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2015-03-09 Paul Pluzhnikov <ppluzhnikov@google.com> + [BZ #18042] + * posix/wordexp.c (parse_backtick): Fix off-by-one. + * posix/wordexp-test.c (test_case): Add test for BZ #18042. + +2015-03-09 Paul Pluzhnikov <ppluzhnikov@google.com> + [BZ #18043] * posix/wordexp-test.c (test_case): Add test for BZ #18043 (do_bz18043): Delete. diff --git a/posix/wordexp-test.c b/posix/wordexp-test.c index dfe4443cce..845407e537 100644 --- a/posix/wordexp-test.c +++ b/posix/wordexp-test.c @@ -234,7 +234,8 @@ struct test_case_struct { WRDE_CMDSUB, NULL, "$((1+`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS }, { WRDE_CMDSUB, NULL, "$((1+$((`echo 1`))))", WRDE_NOCMD, 0, { NULL, }, IFS }, - { WRDE_SYNTAX, NULL, "${", 0, 0, { NULL, }, IFS }, /* BZ 18043 */ + { WRDE_SYNTAX, NULL, "`\\", 0, 0, { NULL, }, IFS }, /* BZ 18042 */ + { WRDE_SYNTAX, NULL, "${", 0, 0, { NULL, }, IFS }, /* BZ 18043 */ { -1, NULL, NULL, 0, 0, { NULL, }, IFS }, }; diff --git a/posix/wordexp.c b/posix/wordexp.c index 1c144014b3..ae4fd72b82 100644 --- a/posix/wordexp.c +++ b/posix/wordexp.c @@ -2143,7 +2143,6 @@ parse_backtick (char **word, size_t *word_length, size_t *max_length, break; } - ++(*offset); error = parse_backslash (&comm, &comm_length, &comm_maxlen, words, offset); |