Browse Source

* Fixed abusive strictness in the font loader.

tags/v0.99.beta14
Sam Hocevar sam 19 years ago
parent
commit
3af72ff5f8
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      cucul/font.c

+ 3
- 3
cucul/font.c View File

@@ -180,8 +180,8 @@ cucul_font_t *cucul_load_font(void const *data, unsigned int size)

if(f->glyph_list[i].data_offset >= f->header.data_size
|| f->glyph_list[i].data_offset
+ f->glyph_list[i].width * f->glyph_list[i].height *
f->header.bpp / 8 >= f->header.data_size)
+ (f->glyph_list[i].width * f->glyph_list[i].height *
f->header.bpp + 7) / 8 > f->header.data_size)
{
free(f->glyph_list);
free(f->block_list);
@@ -433,4 +433,4 @@ void cucul_render_canvas(cucul_t *qq, cucul_font_t *f,
* };
*/

#endif
#endif

Loading…
Cancel
Save