From 3e8ec291ffcfa03c8ecba1cdbfaa55f5577f5612 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Fri, 26 Oct 2018 23:23:48 -0400 Subject: [PATCH] [sfnt] Make `head' timestamps unsigned. It's been more than 2^31 seconds since 1904. * include/freetype/tttables.h (TT_Header): Change field types. * src/sfnt/ttload.c (tt_face_load_generic_header): Updated. --- ChangeLog | 9 +++++++++ include/freetype/tttables.h | 4 ++-- src/sfnt/ttload.c | 8 ++++---- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index a86bcb548..651f26e83 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2018-10-27 Alexei Podtelezhnikov + + [sfnt] Make `head' timestamps unsigned. + + It's been more than 2^31 seconds since 1904. + + * include/freetype/tttables.h (TT_Header): Change field types. + * src/sfnt/ttload.c (tt_face_load_generic_header): Updated. + 2018-10-27 Alexei Podtelezhnikov Revert: Align FreeType with standard C memory management. diff --git a/include/freetype/tttables.h b/include/freetype/tttables.h index 30d5b71c8..05b630a2f 100644 --- a/include/freetype/tttables.h +++ b/include/freetype/tttables.h @@ -91,8 +91,8 @@ FT_BEGIN_HEADER FT_UShort Flags; FT_UShort Units_Per_EM; - FT_Long Created [2]; - FT_Long Modified[2]; + FT_ULong Created [2]; + FT_ULong Modified[2]; FT_Short xMin; FT_Short yMin; diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c index a965bb2f2..c7f37ec51 100644 --- a/src/sfnt/ttload.c +++ b/src/sfnt/ttload.c @@ -638,10 +638,10 @@ FT_FRAME_LONG ( Magic_Number ), FT_FRAME_USHORT( Flags ), FT_FRAME_USHORT( Units_Per_EM ), - FT_FRAME_LONG ( Created[0] ), - FT_FRAME_LONG ( Created[1] ), - FT_FRAME_LONG ( Modified[0] ), - FT_FRAME_LONG ( Modified[1] ), + FT_FRAME_ULONG ( Created[0] ), + FT_FRAME_ULONG ( Created[1] ), + FT_FRAME_ULONG ( Modified[0] ), + FT_FRAME_ULONG ( Modified[1] ), FT_FRAME_SHORT ( xMin ), FT_FRAME_SHORT ( yMin ), FT_FRAME_SHORT ( xMax ),