Fix passing string values via TAR_OPTIONS

* src/tar.c (parse_default_options): Don't free parsed words.
* tests/options03.at: New testcase.
* tests/Makefile.am: Add options03.at
* tests/testsuite.at: Include options03.at
This commit is contained in:
Sergey Poznyakoff
2016-09-21 08:54:53 +03:00
parent ac065c57fd
commit c2886473a8
4 changed files with 48 additions and 1 deletions

View File

@@ -2201,8 +2201,9 @@ parse_default_options (void)
{
ws.ws_wordv[0] = (char*) program_name;
more_options (ws.ws_offs + ws.ws_wordc, ws.ws_wordv, &loc);
/* Don't free consumed words */
ws.ws_wordc = 0;
}
wordsplit_free (&ws);
}