Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 18d2bfd01580105824e2b7dbe051cc04eb1cde97
Ticket: 443938ffffffffffffffffffffffffffffffffff
malloc routines use wrong cast
User & Date: sabbahillel on 2001-08-08 03:17:12
Changes

  1. icomment:
    Logged In: YES 
    user_id=286923
    
    The main problem seems to be that the size_t variables are declared as "(unsigned)" which defaults to 
    "unsigned int". gcc points out that the parameters are a different width when long and int are different (in 
    64 bit mode). Even if it happens to work out, it should still be cased explicitly as (unsigned long) just to be 
    certain. When compiled in 32 bit mode, it won't make a difference (since long = int) but it will make certain 
    that 64 bit does not go bad.
    
    Even if it were not fatal, it would be better to do it correctly as the actual data passed through gets 
    corrupted.
    
    
    
  2. login: "sabbahillel"
  3. mimetype: "text/plain"
  4. username: "sabbahillel"