[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] fix an eternal loop in handle_option -- tar hangs while re
From: |
Nathan Stratton Treadway |
Subject: |
Re: [Bug-tar] fix an eternal loop in handle_option -- tar hangs while reading whitespace from -T file |
Date: |
Thu, 27 Mar 2014 19:45:54 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Wed, Mar 26, 2014 at 18:43:54 +0100, Vitezslav Cizek wrote:
> --- a/src/names.c
> +++ b/src/names.c
> @@ -439,7 +439,7 @@ handle_option (const char *str)
> int i;
>
> while (*str && isspace (*str))
> - ;
> + str++;
In case anyone experiences this bug and goes looking for help on it: the
symptom is that tar will hang when parsing -T files with white space at
the front on a line.
$ echo "bar" | tar -cvf t.tar -T -
bar
$ echo " bar" | tar -cvf t.tar -T -
[...hangs...]^C
I believe this particular problem was introduced during development of
v1.27 (so it's not found in 1.26 and earlier).
Nathan
----------------------------------------------------------------------------
Nathan Stratton Treadway - address@hidden - Mid-Atlantic region
Ray Ontko & Co. - Software consulting services - http://www.ontko.com/
GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt ID: 1023D/ECFB6239
Key fingerprint = 6AD8 485E 20B9 5C71 231C 0C32 15F3 ADCD ECFB 6239