Various clang 8.0 static analyzer fixes

System Internals / FreeType - Werner Lemberg [gnu.org] - 4 May 2019 06:13 EDT

Reported by Sender Ghost.

- src/autofit/afcjk.c (af_cjk_hints_compute_edges): Catch a corner case where `edge->first' could be NULL.

- src/pfr/pfrobjs.c (pfr_slot_load): Remove unnecessary test of `size'.

- src/raster/ftraster.c (Draw_Sweep): Catch a corner case where `draw_right' might be NULL.

- src/sfnt/ttmtx.c (tt_face_get_metrics): Fix limit test for `aadvance'. Ensure `abearing' always hold a meaningful result.

- src/truetype/ttgload.c (load_truetype_glyph): Ensure `subglyph' is not NULL before accessing it.
- src/truetype/ttgxvar.c (TT_Set_Named_Instance): Remove unnecessary test of `namedstyle'.

- src/type42/t42parse.c (t42_parser_done): Ensure `parser->root.funcs.done' is not NULL before accessing it.

7b8410472 Various clang 8.0 static analyzer fixes.
ChangeLog | 27 +++++++++++++++++++++++++++
src/autofit/afcjk.c | 5 ++++-
src/cache/rules.mk | 2 +-
src/pfr/pfrobjs.c | 2 +-
src/raster/ftraster.c | 6 ++++++
src/sfnt/ttmtx.c | 6 ++++--
src/truetype/ttgload.c | 1 +
src/truetype/ttgxvar.c | 2 +-
src/type42/t42parse.c | 3 ++-
9 files changed, 47 insertions(+), 7 deletions(-)

Upstream: git.savannah.gnu.org


  • Share