Werner Lemberg
21c2b3905c
Minor.
6 years ago
Alexei Podtelezhnikov
5d93a3fc8d
[base] Overflow-resistant bitmap presetting.
...
* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Implement it.
6 years ago
Werner Lemberg
19be8620ec
Doc fix.
6 years ago
Armin Hasitzka
934a6159ba
Fix numeric overflows.
...
* src/pshint/pshalgo.c (psh_hint_align, psh_hint_align_light,
psh_hint_table_find_strong_points): Fix numeric overflows.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10083
6 years ago
Werner Lemberg
14dff08f37
ftoption.h: s/precendence/precedence/ in documentation ( #54586 ).
6 years ago
Werner Lemberg
3915a18b8c
[cff] Fix handling of `roll' op in old engine.
...
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10080
* src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_roll>
[CFF_CONFIG_OPTION_OLD_ENGINE]: Use modulo for loop count, as
documented in the specification.
6 years ago
Werner Lemberg
2c8e6279a7
Minor doc fix.
6 years ago
Werner Lemberg
ae3afbc471
* src/truetype/ttobjs.c (tt_size_read_bytecode): Trace CVT values.
6 years ago
Werner Lemberg
2095772144
ChangeLog*: s/\t/ /.
6 years ago
Nikhil Ramakrishnan
f87b711746
* configure: Copy assets required by docwriter.
...
Copy directory `docs/reference/markdown' when FreeType is compiled in a
different directory.
Fixes `make refdoc' if builddir != srcdir.
Reported as
http://lists.nongnu.org/archive/html/freetype-devel/2018-08/msg00083.html
6 years ago
Werner Lemberg
13034e54aa
* src/pshint/pshalgo.c (psh_hint_overlap): Fix numeric overflow.
...
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10057
6 years ago
Werner Lemberg
4738dcc4df
Minor tracing adjustments.
...
* src/base/ftstream.c (FT_Stream_EnterFrame, FT_Stream_ExitFrame):
Trace.
* src/truetype/ttgload.c (TT_Access_Glyph_Frame): Remove tracing.
6 years ago
Werner Lemberg
6e339b8d8e
[truetype] Avoid nested frames.
...
Triggered by
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10054
* src/truetype/ttgload.c (load_truetype_glyph): Don't use variable
`opened_frame' to trace whether a frame must be closed at the end of
function: This fails because `TT_Vary_Apply_Glyph_Deltas' (which
gets called for space glyphs) uses a frame by itself. Instead,
close the frame after loading the header, then use another frame for
the remaining part of the glyph later on.
Also avoid calling `tt_get_metrics' twice under some circumstances.
6 years ago
Werner Lemberg
b287c80b6a
Various minor clean-ups.
...
* src/base/ftapi.c: Remove. Unused.
* src/base/Jamfile (_sources): Updated.
* src/base/ftstream.c (FT_Stream_ReleaseFrame): Remove redundant
code.
6 years ago
Werner Lemberg
c98aa9b78a
Add missing ChangeLog entry for the last four commits.
6 years ago
Nikhil Ramakrishnan
c962db28ea
* builds/*/*: Prepare build system for docwriter.
...
Add checks, rules and variables to the build system for docwriter.
* Running `make' will warn if Python/PIP/docwriter are not available.
* Running `make refdoc' will generate static documentation site on the
current Python environment.
* Running `make refdoc-venv' will generate static documentation site
using a virtual environment, using the pip package `virtualenv'.
6 years ago
Nikhil Ramakrishnan
195728d5ba
* src/tools/docmaker: Remove `docmaker'.
...
`Docmaker' has now upgraded to `docwriter', a pip package available at
https://pypi.org/project/docwriter/
6 years ago
Nikhil Ramakrishnan
53c69ce04f
* docs/reference: Add resources for `docwriter'.
...
Add the required resources (images, JS, CSS) for `docwriter'.
* docs/reference/.gitignore: Update to ignore `site' folder and other
files generated by docwriter.
* docs/reference/README: Add docwriter usage information and
troubleshooting tips.
* docs/reference/markdown: New directory to hold generated markdown
files and other resources.
6 years ago
Nikhil Ramakrishnan
ae5d1a4cec
* include/*.*: Convert comments to markdown.
...
This commit was created by applying scripts `markify.py' and
`markdown-format.bash' to all C header files, followed by minor
clean-up.
No change in functionality, of course.
Scripts used:
https://github.com/nikramakrishnan/freetype-docs.git : Commit dfce31e.
http://lists.nongnu.org/archive/html/freetype-devel/2018-08/msg00013.html :
With patches applied.
6 years ago
Werner Lemberg
77f0814a31
Add macros for handling over-/underflowing `FT_Int64' values.
...
* include/freetype/internal/ftcalc.h (ADD_INT64, SUB_INT64,
MUL_INT64, DIV_INT64) [FT_LONG64]: New macros.
* src/base/ftcalc.c (ft_corner_orientation) [FT_LONG64]: Use
`SUB_INT64' and `MUL_INT64'.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10028
6 years ago
Werner Lemberg
c90cc6443b
ftbitmap.h: Improve documentation.
6 years ago
Werner Lemberg
45524679c6
[truetype] Improve legibility of `glyf' parsing.
...
* src/truetype/ttgload.c (ON_CURVE_POINT, X_SHORT_VECTOR,
Y_SHORT_VECTOR, REPEAT_FLAG, X_POSITIVE, SAME_X, Y_POSITIVE, SAME_Y,
OVERLAP_SIMPLE): New macros.
(TT_Load_Simple_Glyph): Use new macros to make code more readable.
Remove useless adjustment of `outline->tags' elements.
6 years ago
Werner Lemberg
a3e842f9c6
Minor formatting and documentation fixes.
6 years ago
Werner Lemberg
0a33b44e6e
* src/sfnt/ttcpal.c (tt_face_load_cpal): Add missing safety check.
...
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9981
6 years ago
Werner Lemberg
4873eb1d31
Update `CHANGES' file.
6 years ago
Werner Lemberg
4dc0d48f7b
[psaux] Avoid slow PS font parsing in case of error.
...
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9955
* src/psaux/psobjs.c (ps_parser_to_bytes): Set `parser->cursor' even
in case of error to avoid potential re-scanning.
6 years ago
Werner Lemberg
2550fc75a5
[cff] Fix heap buffer overflow in old engine.
...
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9967
* src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
<cff_op_blend> [CFF_CONFIG_OPTION_OLD_ENGINE]: `num_designs' must be
non-zero.
6 years ago
Young Xiao
c94162a220
* builds/mac/ftmac.c (parse_fond): Fix buffer overrun.
...
Reported as bug #54515 , duplicate of #43540 .
6 years ago
Werner Lemberg
33cd1eedcf
* builds/*/ftsystem.c (FT_COMPONENT): Updated also.
6 years ago
Alexei Podtelezhnikov
efa2a3babf
Revert BDF copyright years.
6 years ago
Alexei Podtelezhnikov
af9662e60b
Ouch. BDF copyright year.
6 years ago
Alexei Podtelezhnikov
923fcbcdd8
[bdf] Don't track duplicate encodings.
...
There is no harm except some umbiguity in broken fonts with duplicate
encodings.
* src/bdf/bdflib.c (_bdf_parse_glyphs): Remove duplicate tracking.
(_bdf_parse_t): Remove large `have' bitfield.
6 years ago
Werner Lemberg
a0dd16fb3d
Don't use `trace_' prefix for FT_COMPONENT arguments.
...
* include/freetype/internal/ftdebug.h (FT_TRACE_COMP,
FT_TRACE_COMP_): New auxiliary macros to add `trace_' prefix.
(FT_TRACE): Use `FT_TRACE_COMP'.
*/* (FT_COMPONENT): Updated.
6 years ago
Werner Lemberg
1d7b034cd8
Use formatting string in FT_TRACEX calls for non-simple arguments.
...
* src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
<cff_op_hstem, cff_op_hintmask, cff_op_hlineto, cff_op_vhcurveto>:
Do it.
* src/psaux/pshints.c (cf2_hintmap_build): Ditto.
* src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM,
cf2_cmdVSTEM, cf2_cmdHLINETO, cf2_cmdRRCURVETO, cf2_cmdCALLSUBR,
cf2_escHSTEM3, cf2_cmdHINTMASK, cf2_cmdHVCURVETO>: Ditto.
* src/truetype/ttinterp.c (TT_RunIns): Ditto.
6 years ago
Alexei Podtelezhnikov
e001a17d73
[bdf] Remove unused fields.
...
* src/bdf/bdf.h (bdf_font_t): Remove `nmod', `umod', and `modified',
which were set but never used.
* src/bdf/bdflib.c (_bdf_parse_{glyphs,properties}, bdf_load_font):
Updated accordingly.
6 years ago
Werner Lemberg
44db1addd8
[cff] Fix another segv in old engine.
...
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9872
* src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
[CFF_CONFIG_OPTION_OLD_ENGINE]: Disallow invalid T1 opcodes in
dictionaries.
6 years ago
Werner Lemberg
1937b55734
[cff] Fix missing error handling.
...
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9865
* src/psaux/cffparse.c (cff_parser_run)
[CFF_CONFIG_OPTION_OLD_ENGINE]: Don't ignore return value of
`parse_charstrings_old'.
6 years ago
Alexei Podtelezhnikov
ac2ea865f3
[bdf] Remove unused overflow storage.
...
* src/bdf/bdf.h (bdf_glyphlist_t): Remove this type.
(bdf_font_t): Remove `overflow' field.
* src/bdf/bdflib.c (bdf_free_font): Remove `overflow' freeing.
6 years ago
Werner Lemberg
757bdf1aef
[cff] Fix segv.
...
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9864
* src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
<cff_op_random> [CFF_CONFIG_OPTION_OLD_ENGINE]: Use top dict's
`random' field directly if parsing dictionaries.
6 years ago
Alexei Podtelezhnikov
f5fe6e2f17
[bdf] Use unsigned types.
...
* src/bdf/bdf.h (bdf_glyph_t): Unsign `encoding'.
(bdf_font_t): Unsign `default_char'.
* src/bdf/bdfdrivr.h (BDF_encoding_el): Unsign `enc'.
* src/bdf/bdflib.c (_bdf_add_property, _bdf_parse_glyphs,
_bdf_parse_start): Updated accordingly.
* src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Ditto.
6 years ago
Werner Lemberg
50486df1e6
* src/type42/t42parse.c (t42_parse_sfnts): One more format check.
...
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9832
6 years ago
Armin Hasitzka
37c7b81794
Remove deprecated constant in documentation.
...
* include/freetype/ftdriver.h: Suggest using `FT_HINTING_ADOBE' since
`FT_CFF_HINTING_ADOBE' is deprecated.
6 years ago
Werner Lemberg
5b904409fc
* src/base/ftcalc.c (FT_Matrix_Check): Fix integer overflow.
...
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9811
7 years ago
Alexei Podtelezhnikov
88c0e12109
* src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Follow specs.
7 years ago
Ben Wagner
96b5e50090
* src/sfnt/sfobjs.c (sfnt_done_face): Fix memory leak ( #54435 ).
7 years ago
Nikhil Ramakrishnan
1a21ca7b91
Minor formatting.
7 years ago
Werner Lemberg
1aa73fa83d
* src/base/ftobjs.c (FT_Render_Glyph_Internal): Improve tracing.
7 years ago
Werner Lemberg
c8ef0fd07c
Fix clang warnings.
...
* src/base/ftdebug.c (ft_trace_level_enabled,
ft_trace_level_disabled): Add `static' keyword.
7 years ago
Alexei Podtelezhnikov
e16bfbec4c
[raster, smooth] Reinstate bitmap size limits.
...
This again moves outline and bitmap size checks one level up.
* src/base/ftoutln.c (FT_Outline_Render): Explicitly reject enormous
outlines.
* src/raster/ftrend1.c (ft_raster1_render): Reject enormous bitmaps
and, therefore, outlines that require them.
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
* src/raster/ftraster.c (ft_black_render): Remove outline size checks.
* src/smooth/ftgrays.c (gray_raster_render): Ditto.
[STANDALONE]: Remove `FT_Outline_Get_CBox' copy.
7 years ago
Alexei Podtelezhnikov
6a97c95800
[pcf] Revert massive unsigning.
7 years ago