bugThe FreeType Project - Bugs: bug #33047, Potential problem in psobj.c on...

 
 

bug #33047: Potential problem in psobj.c on 64 bit systems (Windows)

Submitted by:  None
Submitted on:  Mon 11 Apr 2011 09:40:17 AM UTC  
 
Severity: 3 - NormalItem Group: Hack required
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.4.5

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 13 Apr 2011 11:44:54 AM UTC, comment #1:

Applied, thanks.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Mon 11 Apr 2011 09:40:17 AM UTC, original submission:

In psobj.c, function ps_table_add(), line 191++

Assignment of a pointer difference to a variable of type FT_Long:
-------------------------------------------------------
FT_Long in_offset;
in_offset = (FT_Long)((FT_Byte*)object - table->block);
if ( (FT_ULong)in_offset >= table->capacity )
in_offset = -1;
-------------------------------------------------------
FT_Long is defined as signed long, so it is 32 bit size on 64 bit Windows.

Suggestion:
-------------------------------------------------------
FT_PtrDist in_offset;
in_offset = (FT_Byte*)object - table->block;
if ( in_offset < 0 || (FT_Offset)in_offset >= table->capacity )
in_offset = -1;
-------------------------------------------------------

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wl (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 13 Apr 2011 11:44:54 AM UTCwlStatusNone=>Fixed
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.4.5

    Back to the top


    Powered by Savane 3.1-cleanup1