src/hb-ot-map-private.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 255df6801201fb22402420f7b7b7ea8b042df8ba Author: Behdad Esfahbod <beh...@behdad.org> Date: Mon Dec 7 10:34:47 2015 +0100 Fix undefined behavior in cmp function Fixes https://bugs.freedesktop.org/show_bug.cgi?id=93274 diff --git a/src/hb-ot-map-private.hh b/src/hb-ot-map-private.hh index 6f62c77..8692caa 100644 --- a/src/hb-ot-map-private.hh +++ b/src/hb-ot-map-private.hh @@ -203,7 +203,8 @@ struct hb_ot_map_builder_t unsigned int stage[2]; /* GSUB/GPOS */ static int cmp (const feature_info_t *a, const feature_info_t *b) - { return (a->tag != b->tag) ? (a->tag < b->tag ? -1 : 1) : (a->seq < b->seq ? -1 : 1); } + { return (a->tag != b->tag) ? (a->tag < b->tag ? -1 : 1) : + (a->seq < b->seq ? -1 : a->seq > b->seq ? 1 : 0); } }; struct stage_info_t { _______________________________________________ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/harfbuzz