Bug 488840 – harfbuzz: protect against ligid overflow
2007-10-21 Behdad Esfahbod <behdad@gnome.org> Bug 488840 – harfbuzz: protect against ligid overflow * pango/opentype/harfbuzz-buffer.c (_hb_buffer_allocate_ligid): Never return zero, even in case of overflow. * pango/opentype/harfbuzz-impl.h: Define dummy HB_LIKELY() and HB_UNLIKELY(), to be filled later.
This commit is contained in:
parent
6b347138b5
commit
13b2b96384
@ -356,5 +356,9 @@ _hb_buffer_replace_output_glyph( HB_Buffer buffer,
|
|||||||
HB_INTERNAL FT_UShort
|
HB_INTERNAL FT_UShort
|
||||||
_hb_buffer_allocate_ligid( HB_Buffer buffer )
|
_hb_buffer_allocate_ligid( HB_Buffer buffer )
|
||||||
{
|
{
|
||||||
return ++buffer->max_ligID;
|
buffer->max_ligID++;
|
||||||
|
if (HB_UNLIKELY (buffer->max_ligID == 0))
|
||||||
|
buffer->max_ligID++;
|
||||||
|
|
||||||
|
return buffer->max_ligID;
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,9 @@ FT_BEGIN_HEADER
|
|||||||
# define FT_UNUSED(arg) ((arg) = (arg))
|
# define FT_UNUSED(arg) ((arg) = (arg))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define HB_LIKELY(cond) (cond)
|
||||||
|
#define HB_UNLIKELY(cond) (cond)
|
||||||
|
|
||||||
#include "ftglue.h"
|
#include "ftglue.h"
|
||||||
|
|
||||||
#define ARRAY_LEN(Array) ((int)(sizeof (Array) / sizeof (Array)[0]))
|
#define ARRAY_LEN(Array) ((int)(sizeof (Array) / sizeof (Array)[0]))
|
||||||
|
Loading…
Reference in New Issue
Block a user