~ubuntu-branches/debian/squeeze/openttd/squeeze

« back to all changes in this revision

Viewing changes to src/fontcache.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Matthijs Kooijman
  • Date: 2008-08-08 11:07:05 UTC
  • mfrom: (1.1.4 upstream) (2.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080808110705-zq0eo95c4pexg70i
* New upstream release.
  - Fixes remote crash vulnerability CVE-2008-3547. Closes: #493714

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: fontcache.cpp 11981 2008-01-25 13:48:39Z peter1138 $ */
 
1
/* $Id: fontcache.cpp 13871 2008-07-29 22:37:54Z rubidium $ */
2
2
 
3
3
/** @file fontcache.cpp */
4
4
 
415
415
        FT_Load_Char(face, key, FT_LOAD_DEFAULT);
416
416
        FT_Render_Glyph(face->glyph, aa ? FT_RENDER_MODE_NORMAL : FT_RENDER_MODE_MONO);
417
417
 
 
418
        /* Despite requesting a normal glyph, FreeType may have returned a bitmap */
 
419
        aa = (slot->bitmap.palette_mode == FT_PIXEL_MODE_GRAY);
 
420
 
418
421
        /* Add 1 pixel for the shadow on the medium font. Our sprite must be at least 1x1 pixel */
419
422
        width  = max(1, slot->bitmap.width + (size == FS_NORMAL));
420
423
        height = max(1, slot->bitmap.rows  + (size == FS_NORMAL));