mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-09 23:00:07 +00:00
Fix off-by-one which caused BZ #18042 and add a test for it.
This commit is contained in:
parent
36103ba2f5
commit
f8ba70e9f8
@ -1,3 +1,9 @@
|
||||
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]
|
||||
|
@ -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 },
|
||||
};
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user