[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
-L option in tar 1.13
From: |
BStrand7 |
Subject: |
-L option in tar 1.13 |
Date: |
Mon, 12 Nov 2001 11:56:33 EST |
Greetings,
I think I've found a compare sense issue in the parsing of the parameter for
the -L (tape length) option. The parameter is parsed on line 657 of tar.c
using xstrtoul, as follows:
if (xstrtoul (optarg, (char **) 0, 10, &u, "") != LONG_MAX)
USAGE_ERROR ((0, 0, _("Invalid tape length")));
Looking at ../lib/xtrtol.c, it appears that LONG_MAX is returned in the case of
an overflow. In order for a valid length parameter to pass the above test,
therefore, the sense must be reversed, as in "if... == LONG_MAX". I've made
this change, rebuilt, and the program now appears to work as expected, so I
thought I'd run it by you folks. Please let me know if you see any other
ramifications of running like this that I'm not seeing, as I'm planning to put
the patched version in a production environment.
Regards,
Brian Strand
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- -L option in tar 1.13,
BStrand7 <=