From 6a7290d875b8f5b260c3287f7c63161026de2937 Mon Sep 17 00:00:00 2001 From: handa Date: Mon, 23 Apr 2012 00:28:46 +0000 Subject: [PATCH] (get_class_def_auto): Return 0 if C is negative. --- src/otfdrive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/otfdrive.c b/src/otfdrive.c index 97e1974..dc94ed4 100644 --- a/src/otfdrive.c +++ b/src/otfdrive.c @@ -1563,7 +1563,7 @@ static int get_class_def_auto (int c) = sizeof glyph_class_table / sizeof glyph_class_table[0]; int low, high, mid; - if (c >= glyph_class_table[table_size - 1]) + if (c < 0 || c >= glyph_class_table[table_size - 1]) return 0; low = 0; high = table_size - 1; -- 1.7.10.4