Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2014-03-17
21:20 • Closed ticket [f7654f59c6]: crc::sum returns incorrect checksum on 1K data, Win ... artifact: c73ae9dd99 user: aku
19:46 • New ticket [f7654f59c6]. artifact: e484bd5aa0 user: anonymous

crc::sum returns incorrect checksum on 1K data, Win 7 64-bit.

Closed / Rejectedf7654f59c6b62b0fb451f8a22bbd16c7b9c9dd66Created 13 years agoUpdated 13 years ago
Descriptionplain2014-03-17 19:46:34
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.
akuplain2014-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.
Log in (anonymous is fine) to add a comment.