freetype2/src/base
Ben Wagner 15afb55458 [base] Report used stream's external status.
In `open_face` the initial stream is set on the face, along with the
information about if FreeType is the owner of the stream object itself.  The
loaders may in the course of their work replace this stream with a new
stream (as is the case for 'woff' and 'woff2'), which may have a different
ownership than the initial stream object (likely the original stream object
is owned by the user and is external, while the new stream object is created
internally to FreeType and is internal).  When the stream is replaced, the
face's flags are updated with the new ownership status.

However, `open_face` cannot itself free this stream as its caller
`ft_open_face_internal` is responsible for this.  In addition, in the case
of an error `open_face` cannot return an actual face with the new stream and
its ownership status to the caller.  As a result, it must pass this
information back to the caller as a sort of "failed face" so that the caller
can clean up.

`open_face` was already passing back the new stream but was not passing back
the stream ownership information.  As a result the stream may not have been
free'd when needed.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54700

* src/base/ftobjs.c (open_face): Pass back the ownership information as
well.
(ft_open_face_internal): Updated.
2023-01-05 22:05:02 +01:00
..
ftadvanc.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ftbase.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ftbase.h Add `FT_Glyph` support for OT-SVG glyphs. 2022-01-20 16:45:18 +00:00
ftbbox.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ftbdf.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ftbitmap.c [base] Clean up the bitmap flow control. 2022-09-22 20:40:21 -04:00
ftcalc.c [base] Round values in `FT_MulAdd_Fix`. 2022-07-01 14:01:08 +02:00
ftcid.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ftcolor.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ftdbgmem.c * src/base/ftdbgmem.c (ft_mem_source_compare): Add FT_COMPARE_DEF. 2022-11-22 22:34:41 -05:00
ftdebug.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
fterrors.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ftfntfmt.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ftfstype.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ftgasp.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ftgloadr.c [base] Build outlines in amortized constant time. 2022-07-23 23:30:22 +02:00
ftglyph.c * src/base/ftglyph.c (FT_Get_Glyph): Set `*aglyph` to NULL in case of error. 2022-07-29 22:57:18 +02:00
ftgxval.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
fthash.c * src/base/fthash.c (hash_insert): Avoid unnecessary zeroing. 2022-01-14 18:22:23 +00:00
ftinit.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ftlcdfil.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ftmac.c [build] fix for make multi 2022-11-08 14:23:37 +09:00
ftmm.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ftobjs.c [base] Report used stream's external status. 2023-01-05 22:05:02 +01:00
ftotval.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ftoutln.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ftpatent.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ftpfr.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ftpsprop.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ftrfork.c Whitespace. 2022-04-01 08:50:33 +02:00
ftsnames.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ftstream.c [stream] Fix reading s32 when long is s64 2022-06-18 12:58:23 -04:00
ftstroke.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ftsynth.c * src/base/ftsynth.c (FT_GlyphSlot_Slant): New API with custom slant. 2022-10-16 22:10:19 -04:00
ftsystem.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
fttrigon.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
fttype1.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ftutil.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
ftver.rc * src/base/ftver.rc: Explicitly use UTF-16. 2022-08-26 22:24:02 -04:00
ftwinfnt.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
md5.c * src/base/md5.c: Updated to recent version. 2016-06-16 06:17:54 +02:00
md5.h * src/base/md5.c, src/base/md5.h: Updated to recent version. 2013-10-22 01:10:10 +02:00
rules.mk Update all copyright notices. 2022-01-11 10:54:10 +01:00