Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 29cbad5907c2a1e77527e5810e20d22a2721753c
Ticket: 2662434fffffffffffffffffffffffffffffffff
zlib crc32 returns negative integers
User & Date: egavilan on 2009-03-04 17:17:08
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    The now in-core [zlib crc32] command returns a signed integer. Most implementations, including tcllib's crc32 and the sample code of RFC 1952 (http://www.ietf.org/rfc/rfc1952.txt) returns unsigned values.
    While I don't have access to the ISO 3309 standard in which the checksum is defined, the signed value is inconsistent with other tools in the wild (including tcl ones).
    
    Example code:
    % info patchlevel
    8.6b1.1
    % package require crc32
    1.3
    % set a "dabale arroz a la zorra el abad"
    dabale arroz a la zorra el abad
    % zlib crc32 $a
    -452134725
    % crc::crc32 $a
    3842832571
    % expr [zlib crc32 $a] & 0xffffffff
    3842832571
    
    
  4. foundin changed to: "obsolete: 8.6b1.1"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "egavilan"
  10. subsystem changed to: "57. zlib"
  11. title changed to: "zlib crc32 returns negative integers"
  12. type changed to: "Bug"