bug-textutils
[Top][All Lists]
Advanced

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

Problems with sum in textutils


From: nick lawes
Subject: Problems with sum in textutils
Date: Thu, 25 Oct 2001 12:21:56 +0100

Hi

I've been looking into a problem that has surfaced on our systems, and
it turns out that the problem in in the gnu 'sum' utility as shipped
with RedHat 7.1.

I realise that they have annoyingly shipped an alpha version of
textutils, but as the problem will become official when this version
gets released, I felt I should point it out.

The problem is the addition of the line:

      /* Reduce checksum mod 0xffff, to avoid overflow.  */
      checksum = (checksum & 0xffff) + (checksum >> 16);

Adding (checksum >> 16) makes the number returned for large files (e.g.
38MB) incompatible with earlier gnu sums and with system V sum that it
claims to be compatible with.

I can get around the problem for now by using an older version of sum,
but this problem will no doubt bite many people when it's released...

Regards

/nick

-- 
Nick Lawes | SilverPlatter Information | mailto:address@hidden



reply via email to

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