freetype2/include/freetype
Oleg Oshmyan a4c8f21ae7 [base] Reject combinations of incompatible `FT_OPEN_XXX` flags.
The three modes are mutually exclusive, and the documentation of the
`FT_OPEN_XXX` constants notes this.  However, there was no check to
validate this in the code, and the documentation on `FT_Open_Args`
claimed that the corresponding bits were checked in a well-defined
order, implying it was valid (if useless) to specify more than one.
Ironically, this documented order did not agree with the actual
code, so it could not be relied upon; hopefully, nobody did this and
nobody will be hurt by the new validation.

Even if multiple mode bits were allowed, they could cause memory
leaks: if both `FT_OPEN_STREAM` and `stream` are set along with
either `FT_OPEN_MEMORY` or `FT_OPEN_PATHNAME`, then `FT_Stream_New`
allocated a new stream but `FT_Open_Face` marked it as an 'external'
stream, so the stream object was never released.

* src/base/ftobjs.c (FT_Stream_New): Reject incompatible
`FT_OPEN_XXX` flags.
2021-07-13 10:44:38 +02:00
..
config Small clean-ups for the last few commits. 2021-07-12 22:03:25 +02:00
internal Small clean-ups for the last few commits. 2021-07-12 22:03:25 +02:00
freetype.h [base] Reject combinations of incompatible `FT_OPEN_XXX` flags. 2021-07-13 10:44:38 +02:00
ftadvanc.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftbbox.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftbdf.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftbitmap.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftbzip2.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftcache.h Typo. 2021-04-18 10:24:31 -04:00
ftchapters.h [base] Add public API to change the levels of tracing components. 2020-12-01 09:25:53 +01:00
ftcid.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftcolor.h [sfnt] Support PaintScale in 'COLR' v1 parsing. 2021-07-01 06:49:03 +02:00
ftdriver.h Small clean-ups for the last few commits. 2021-07-12 22:03:25 +02:00
fterrdef.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
fterrors.h fterrors.h: Fix documentation extraction of `FT_Error_String`. 2021-06-23 08:14:42 +02:00
ftfntfmt.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftgasp.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftglyph.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftgxval.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftgzip.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftimage.h [sdf] Use 8 bits for final SDF output instead of 16bits. 2021-06-08 08:29:34 +05:30
ftincrem.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftlcdfil.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftlist.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftlogging.h More various documentation improvements and fixes. 2021-06-08 18:23:16 +02:00
ftlzw.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftmac.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftmm.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftmodapi.h Small clean-ups for the last few commits. 2021-07-12 22:03:25 +02:00
ftmoderr.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftotval.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftoutln.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftparams.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftpfr.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftrender.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftsizes.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftsnames.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftstroke.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftsynth.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftsystem.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
fttrigon.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
fttypes.h [sdf] Use 8 bits for final SDF output instead of 16bits. 2021-06-08 08:29:34 +05:30
ftwinfnt.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
t1tables.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ttnameid.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
tttables.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
tttags.h Update all copyright notices. 2021-01-17 07:18:48 +01:00