bugThe FreeType Project - Bugs: bug #30788, Cache manager null pointer...

 
 

bug #30788: Cache manager null pointer reference in low memory situation

Submitted by:  Teijo Kinnunen <tkinnunen>
Submitted on:  Mon 16 Aug 2010 11:28:46 AM UTC  
 
Severity: 3 - NormalItem Group: Crash
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.4.3

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 17 Aug 2010 05:42:27 AM UTC, comment #2:

Applied to git, thanks.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Mon 16 Aug 2010 11:42:37 AM UTC, comment #1:

Here's also a possible fix for this (for FreeType 2.4.2):
--- ftccache.c 21 Jul 2010 11:52:01 -0000 1.2
+++ ftccache.c 16 Aug 2010 11:36:29 -0000
@@ -346,7 +346,7 @@
static void
FTC_Cache_Clear( FTC_Cache cache )
{
- if ( cache )
+ if ( cache && cache->buckets )
{
FTC_Manager manager = cache->manager;
FT_UFast i;

Teijo Kinnunen <tkinnunen>
Mon 16 Aug 2010 11:28:46 AM UTC, original submission:

During FTC_Manager_RegisterCache() call, the FT_NEW_ARRAY() allocation inside ftc_cache_init() may fail leaving cache->buckets to 0. In this case, however, the pointer will be used in the subsequent FTC_Cache_Clear() call, which causes a crash.

Teijo Kinnunen <tkinnunen>

 

(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)
  • -unavailable- added by tkinnunen (Submitted 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 Aug 2010 05:42:27 AM UTCwlStatusNone=>Fixed
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.4.3

    Back to the top


    Powered by Savane 3.1-cleanup1