Ver código fonte

* Fixed abusive strictness in the font loader.

tags/v0.99.beta14
Sam Hocevar sam 19 anos atrás
pai
commit
3af72ff5f8
1 arquivos alterados com 3 adições e 3 exclusões
  1. +3
    -3
      cucul/font.c

+ 3
- 3
cucul/font.c Ver arquivo

@@ -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

Carregando…
Cancelar
Salvar