Skip to content
  • Kan-Ru Chen's avatar
    Fix reading of signed integers from files on 64bit platforms. · 21b1a0de
    Kan-Ru Chen authored and Werner Lemberg's avatar Werner Lemberg committed
    Previously, signed integers were converted to unsigned integers, but
    this can fail because of sign extension.  For example, 0xa344a1eb
    becomes 0xffffffffa344a1eb.
    
    We now do the reverse which is always correct because the integer
    size is the same during the cast from unsigned to signed.
    
    * include/freetype/internal/ftstream.h, src/base/ftstream.c
    (FT_Stream_Get*): Replace with...
    (FT_Stream_GetU*): Functions which read unsigned integers.
    Update all macros accordingly.
    
    * src/gzip/ftgzip.c (ft_gzip_get_uncompressed_size): Updated.
    21b1a0de
To find the state of this project's repository at the time of any of these versions, check out the tags.