bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tar-1.13 and tape_lenght


From: Giuseppe Lo Biondo
Subject: tar-1.13 and tape_lenght
Date: Tue, 26 Jun 2001 15:50:52 +0200 (MET DST)

Hi!,

It seems that the -L option in tar 1.13 is broken,

The flag argument check:

(xstrtoul (optarg, (char **) 0, 10, &u, "") != LONG_MAX) ;
is (almost) never  true.

--------
This

 case 'L':
        {
          unsigned long u;
          if (xstrtoul (optarg, (char **) 0, 10, &u, "") != LONG_MAX)

            USAGE_ERROR ((0, 0, _("Invalid tape length")));
          clear_tarlong (tape_length_option);
          add_to_tarlong (tape_length_option, u);
          mult_tarlong (tape_length_option, 1024);
          multi_volume_option = 1;
        }
        break;

should be

 case 'L':
        {
          unsigned long u;
          if (xstrtoul (optarg, (char **) 0, 10, &u, "") >= LONG_MAX)

            USAGE_ERROR ((0, 0, _("Invalid tape length")));
          clear_tarlong (tape_length_option);
          add_to_tarlong (tape_length_option, u);
          mult_tarlong (tape_length_option, 1024);
          multi_volume_option = 1;
        }
        break;

(.... or at least this is what is fine for me)

Best Regards,
Giuseppe Lo Biondo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]