summaryrefslogtreecommitdiff
path: root/src/psnames
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2017-01-03 00:27:07 +0100
committerWerner Lemberg <wl@gnu.org>2017-01-03 00:27:07 +0100
commit248eaa4f601381bdcb584c16a370b5e0ad553613 (patch)
treeea081272189fa858f33dfd4a576b5297802d7e83 /src/psnames
parentbdec162d921d69f63b992a74b32542b973a6c117 (diff)
downloadfreetype2-248eaa4f601381bdcb584c16a370b5e0ad553613.tar.gz
Various fixes for clang's undefined behaviour sanitizer.
* src/cff/cffload.c (FT_fdot14ToFixed): Fix casting. (cff_blend_doBlend): Don't left-shift negative numbers. Handle 5-byte numbers byte by byte to avoid alignment issues. * src/cff/cffparse.c (cff_parse): Handle 5-byte numbers byte by byte to avoid alignment issues. * src/cid/cidload (cid_read_subrs): Do nothing if we don't have any subrs. * src/psaux/t1decode.c (t1_decode_parse_charstring): Fix tracing. * src/tools/glnames.py (main): Put `DEFINE_PSTABLES' guard around definition of `ft_get_adobe_glyph_index'. * src/psnames/pstables.h: Regenerated. * src/psnames/psmodule.c: Inlude `pstables.h' twice to get both declaration and definition. * src/truetype/ttgxvar.c (FT_fdot14ToFixed, FT_intToFixed): Fix casting.
Diffstat (limited to 'src/psnames')
-rw-r--r--src/psnames/psmodule.c1
-rw-r--r--src/psnames/pstables.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/psnames/psmodule.c b/src/psnames/psmodule.c
index 01b85c3c8..af7067e09 100644
--- a/src/psnames/psmodule.c
+++ b/src/psnames/psmodule.c
@@ -23,6 +23,7 @@
#include "psmodule.h"
+#include "pstables.h"
#define DEFINE_PS_TABLES
#include "pstables.h"
diff --git a/src/psnames/pstables.h b/src/psnames/pstables.h
index 309f16bd3..cae2f1f84 100644
--- a/src/psnames/pstables.h
+++ b/src/psnames/pstables.h
@@ -4135,6 +4135,7 @@
;
+#ifdef DEFINE_PS_TABLES
/*
* This function searches the compressed table efficiently.
*/
@@ -4229,6 +4230,7 @@
NotFound:
return 0;
}
+#endif /* DEFINE_PS_TABLES */
#endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */