Andrew Church 67cf7a8841 Fix Savannah bug #39266.
If memory allocations fail at certain points while opening a font,
FreeType can either crash due to a NULL dereference or leak memory.

* include/freetype/internal/ftobjs.c (FT_Face_InternalRec,
FT_LibraryRec): Make `refcount' a signed integer.  If, for example,
FT_Open_Face() fails in a memory allocation before the face's
reference count is set to 1, a subsequent `FT_Done_Library' call
would otherwise loop over `FT_Done_Face' 2^32 times before freeing
the face.

* src/base/ftobjs.c (open_face): Initialize `stream' and friends
earlier.
(FT_Open_Face) <Fail>: Behave correctly if `node' is NULL.
(FT_Destroy_Module) <Fail>: Check that `renderer_clazz' is valid.
2013-06-18 09:35:34 +02:00
..
2013-06-18 09:35:34 +02:00
2013-06-06 09:16:38 +02:00
2013-03-14 11:21:17 +01:00
2013-06-06 09:16:38 +02:00
2013-06-04 10:30:48 +02:00
2013-06-06 09:16:38 +02:00
2013-06-06 09:16:38 +02:00
2013-03-17 08:14:46 +01:00
2013-06-12 10:58:06 +02:00
2013-06-04 13:09:01 +02:00
2013-06-12 10:58:06 +02:00
2013-06-04 10:30:48 +02:00
2005-06-04 23:04:30 +00:00