bugThe FreeType Project - Bugs: bug #35286, out of bounds access - gxvcommn.c

 
 

bug #35286: out of bounds access - gxvcommn.c

Submitted by:  None
Submitted on:  Wed 11 Jan 2012 10:37:13 AM UTC  
 
Severity: 3 - NormalItem Group: Incorrect behaviour
Status: FixedPrivacy: Public
Assigned to: suzuki toshiya <mpsuzuki>Open/Closed: Closed
Planned Release: 2.4.9

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 17 Jan 2012 07:24:59 AM UTC, comment #2:

Sorry for lated action, just I've fixed in GIT HEAD.
The number 3 (the number of the sub tables in state
tables) is correct, the number 4 might be a mistake
considering the buffer size.
In fact, gxv_StateTable_subtable_setup does call
gxv_set_length_by_ushort_offset() with 3!

Thank you very very much again.

suzuki toshiya <mpsuzuki>
Project AdministratorIn charge of this item.
Wed 11 Jan 2012 10:57:06 AM UTC, comment #1:

Thanks, I will check this soon.

suzuki toshiya <mpsuzuki>
Project AdministratorIn charge of this item.
Wed 11 Jan 2012 10:37:13 AM UTC, original submission:

Detected in version 2.3.11, but also found in version 2.8

The function gxv_XStateTable_subtable_setup is calling gxv_set_length_by_ulong_offset with a wrong upper bound.

File: gxvcommn.c
Line: 1325

/* ================= eXtended State Table (for morx) =================== */

FT_LOCAL_DEF( void )
gxv_XStateTable_subtable_setup( FT_ULong table_size,
FT_ULong classTable,
FT_ULong stateArray,
FT_ULong entryTable,
FT_ULong* classTable_length_p,
FT_ULong* stateArray_length_p,
FT_ULong* entryTable_length_p,
GXV_Validator valid )
{
FT_ULong o[3];
FT_ULong* l[3];
FT_ULong buff[4];

o[0] = classTable;
o[1] = stateArray;
o[2] = entryTable;
l[0] = classTable_length_p;
l[1] = stateArray_length_p;
l[2] = entryTable_length_p;

gxv_set_length_by_ulong_offset( o, l, buff, 4, table_size, valid );
}

I suppose the upper bound should be 3!

gxv_set_length_by_ulong_offset( o, l, buff, 3, table_size, valid );

kind regards

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 mpsuzuki (Posted a comment)
  • -unavailable- added by wl (Updated the item)
  •  

    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
    Tue 17 Jan 2012 07:24:59 AM UTCmpsuzukiStatusNone=>Fixed
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.4.9
    Wed 11 Jan 2012 10:46:15 AM UTCwlAssigned toNone=>mpsuzuki

    Back to the top


    Powered by Savane 3.1-cleanup1