Tcl Source Code

View Ticket
Login
Ticket UUID: f7654f59c6b62b0fb451f8a22bbd16c7b9c9dd66
Title: crc::sum returns incorrect checksum on 1K data, Win 7 64-bit.
Type: Bug Version: SUM 1.1.0
Submitter: anonymous Created on: 2014-03-17 19:46:34
Subsystem: - New Builtin Commands Assigned To: nobody
Priority: 5 Medium Severity: Critical
Status: Closed Last Modified: 2014-03-17 21:20:16
Resolution: Rejected Closed By: aku
    Closed on: 2014-03-17 21:20:16
Description:
Using a 1024 byte input string, the resulting checksum is incorrect.  I suspect the problem has to do with the sum exceeding 16 bits, and the return statement from ::crc::SumSysV is using a "%" operator rather than "&" to mask the output.

Command being used:
  set ckSum [crc::sum -sysv -- $data]

  where data is a 1024 byte string.

The correct checksum is returned if the data string is 128 bytes.
User Comments: aku added on 2014-03-17 21:20:16:
This ticket does not belong here.

It should submitted to the the Tcllib bug tracker at http://core.tcl.tk/tcllib
instead.

Notes: Please provide info if a specific input string is needed, or any string above the 1K will do to trigger the issue.