freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype][gsoc-anurag-2022] 50 commits: [base, type1] Bet


From: Anurag Thakur (@AdbhutDev)
Subject: [Git][freetype/freetype][gsoc-anurag-2022] 50 commits: [base, type1] Better handling of out-of-memory situations.
Date: Mon, 03 Oct 2022 21:46:29 +0000

Anurag Thakur pushed to branch gsoc-anurag-2022 at FreeType / FreeType

Commits:

  • 37b718d5
    by Chris Liddell at 2022-08-21T19:41:45+02:00
    [base, type1] Better handling of out-of-memory situations.
    
    This follows similar code in `cff_slot_done`.
    
    * src/base/ftobjs.c (ft_glyphslot_done), src/type1/t1objs.c
    (T1_GlyphSlot_Done): Check `internal` pointer.
    
    The Type1 problems was reported as
    
      https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50057.
    
  • 395da3d7
    by Sean Farrell at 2022-08-21T19:58:35+02:00
    CMakeLists.txt (FT_ENABLE_ERROR_STRINGS): New configuration option.
    
    This option uncomments FreeType configuration macro
    `FT_CONFIG_OPTION_ERROR_STRINGS` to make function `FT_Error_String` return
    meaningful error strings.
    
    This option is off by default.
    
  • 4797b2ff
    by Dominik Röttsches at 2022-08-26T12:08:34+03:00
    [sfnt] Avoid undefined shifts in `COLR` v1 color line retrieval
    
    * src/sfnt/ttcolr.c (tt_face_get_colorline_stops): Disambiguate shift
    behavior by using multiplication using macros from ftcalc.h.
    
    Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50573
    
  • dd91f6e7
    by Alexei Podtelezhnikov at 2022-08-26T22:24:02-04:00
    * src/base/ftver.rc: Explicitly use UTF-16.
    
    Fixes #1177 to avoid mistranslation and other problems.
    
  • a1017e26
    by Dominik Röttsches at 2022-09-05T10:36:22+02:00
    [sfnt] Don't require 'gvar' table to support variation fonts.
    
    Fixes #1172.
    
    * src/sfnt/sfobjs.c (sfnt_load_face): Tag font as Multiple Masters font if
    `fvar` is present; do not require other tables to be present.
    
    * src/truetype/ttgxvar.c (tt_set_mm_blend): Allow for a missing 'gvar' table
    when setting variation coordinates.  However, if a 'gvar' table is actually
    present, do perform a sanity check and fail on malformedness.
    (TT_Get_MM_Var): Don't assume 'fvar' needs 'gvar' or 'CFF2 tables in all
    cases, which is an overly tight check.
    
  • 048f2e24
    by Werner Lemberg at 2022-09-05T10:43:59+02:00
    [autofit] Minor fix.
    
    * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): Avoid
    compiler warning.
    
  • 6d62076a
    by Dominik Röttsches at 2022-09-05T12:23:31+02:00
    [sfnt] Pointer sanity checks before reading layer info in 'COLR' v0
    
    * src/sfnt/ttcolr.c (tt_face_get_colr_layer): Check that the pointer to
    read from is within the 'COLR' table.
    
    Reported as
    
      https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50633
    
  • 91a7fae7
    by Dominik Röttsches at 2022-09-05T15:52:58+02:00
    [sfnt] Handle variable `COLR` v1 fonts without delta set index map
    
    Fixes #1178.
    
    * src/sfnt/ttcolr.c (get_deltas_for_var_index_base): Set outer index to
    0 and inner index to the delta index when retrieving deltas if the
    `COLR` table has no delta set index map.
    
  • 8e68439a
    by Dominik Röttsches at 2022-09-06T17:18:17+02:00
    [truetype] Reject 'fvar' loading when `num_instances` is too small.
    
    * src/truetype/ttgxvar.c (TT_Get_MM_Var): Reject retrieving master when
    'fvar' values locally do not match with sanitized values from initialization
    at `sfnt_init_face` time.
    
    Reported as
    
      https://bugs.chromium.org/p/chromium/issues/detail?id=1360295
    
  • a0d15364
    by Werner Lemberg at 2022-09-15T09:14:06+02:00
    * src/otvalid/otvgsub.c (otv_SingleSubst_validate): Fix format 1 handling.
    
    Fixes #1181.
    
  • 33ceac2a
    by Dominik Röttsches at 2022-09-16T18:55:24+02:00
    Reject 'COLR' table if version is 1 but header too small.
    
    * src/sfnt/ttcolr.c (tt_face_load_colr): If the version is determined to
    be 1, then the table size has to be at least the size of the v1 header.
    Also, for peeking the number of base glyphs and entries in the layer list,
    ensure that the table is sufficiently long.
    
    Fixes #1179.  Original patch by Sergey Temnikov.
    
  • c456eeb4
    by Alexei Podtelezhnikov at 2022-09-22T15:09:17+00:00
    [base] Discard and recreate bitmaps for copying and converting.
    
    Reusing target bitmaps for copying and converting is permitted.  It is,
    however, pointless to preserve their content before overwriting.  Free-
    malloc might be faster than realloc.
    
    * src/base/ftbitmap.c (FT_Bitmap_Copy, FT_Bitmap_Convert): Free
    an old buffer and create a new one.
  • c9c32631
    by Alexei Podtelezhnikov at 2022-09-22T20:40:21-04:00
    [base] Clean up the bitmap flow control.
    
    * src/base/ftbitmap.c (FT_Bitmap_Copy): Flip the copy if its pitch
    is trully opposite, zero is not a positive value.
    (FT_Bitmap_Convert): Set negative pitch as needed, accept negative
    alignment values.
    
  • bd417007
    by Ben Wagner at 2022-09-27T07:31:32+02:00
    [sfnt] Add SVG document bounds checking.
    
    Add a check that the document content is actually contained within the
    `SVG ` table.  Without this check a malformed font may claim arbitrary
    memory as its document content.
    
    * src/sfnt/ttsvg.c (tt_face_load_svg): Take `numEntries` into account when
    testing 'documentRecord' extents.
    (find_doc): Rename `stream` to `document_records` for clarity.
    (tt_face_load_svg_doc): Split `doc` from `doc_list` pointer for clarity.
    Test that the document content is contained within the table.
    Ensure minimum length of document before testing for gzip format.
    
    Reported as
    
      https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51812
    
  • df260139
    by Dominik Röttsches at 2022-09-27T18:18:59+02:00
    [sfnt] Guard access in 'COLR' table when requesting child table pointer.
    
    * src/sfnt/ttcolr.c (tt_face_get_colorline_stops, read_paint): Tighten
    pointer bounds checks.
    (get_child_table_pointer): Check whether incoming pointer `p` lies within
    the 'COLR' table.
    
    Reported as
    
      https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51816
    
  • 3f3427c6
    by Azamat Hackimov at 2022-09-28T22:35:49-04:00
    * src/tools/*.py: Migrate to Python 3.
    
    Fixes #1185, closes !205. Formatting changes according to PEP8.
    
  • 5faa1df8
    by Ali Chraghi at 2022-09-29T19:30:20+02:00
    [base] FT_Attach_Stream: Make `parameters` argument constant.
    
  • ff66e912
    by Alexei Podtelezhnikov at 2022-09-29T17:46:23+00:00
    * src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Use lighter FT_DivFix.
  • 90527092
    by mlugg at 2022-09-29T20:44:41+02:00
    [truetype] Fix undefined pointer arithmetic.
    
    * src/truetype/ttgxvar.c (tt_var_get_item_delta, ft_var_load_mvar): Use
    `FT_OFFSET`.
    
  • 2adb810c
    by Werner Lemberg at 2022-09-30T17:00:10+02:00
    * src/psaux/pshints.c (cf2_hintmap_build): Improve debugging output.
    
  • de8f14a8
    by Werner Lemberg at 2022-09-30T23:25:02+02:00
    * src/psaux/pshints.c (cf2_hintmap_insertHint): Fix midpoint computation.
    
    Replace '(start + end) / 2' with 'start + (end - start) / 2' to avoid
    overflow.
    
    Fixes #1180.
    
  • b93f20ab
    by Alexei Podtelezhnikov at 2022-10-03T15:10:12+00:00
    * src/cache/ftcbasic.c (ftc_basic_family_get_count): Remove redundancy.
  • 8faf57dd
    by Alexei Podtelezhnikov at 2022-10-03T17:13:30+00:00
    * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Avoid `FT_Set_Charmap`.
    
    Set charmap aggressively without all validations of `FT_Set_Charmap`
    because we take it from the available array and only temporarily.
    Even CMap Format 14 will gracefully return 0.
  • 7511d64e
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Add files for new 'dense' module
    
  • f6a2237f
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Populate errors header for 'dense' renderer
    
  • 63dd9243
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Added things
    
  • 9b40ce9c
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Finish importing code, integration pending
    
  • dee8855a
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Compilation fix attempt #1
    
  • 05c87900
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Trying to get it to work attempt #1
    
  • 1e0918c4
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Integration prototype successful
    
  • e122ecf1
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Remove printfs
    
  • dbf9623a
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Added cmake build
    
  • bb95b442
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Added commentary
    
  • 39bcb3a6
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Logging for testing
    
  • 8687c459
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Temp fix for upside-down bitmap
    
  • 8af62c34
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Partially move parameters to existing types
    
  • d9c301d3
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Fix quadratic rendering
    
  • 9aafe98c
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Use inbuilt data-types
    
  • 94183cf0
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Revert unrelated changes
    
  • 6f86728e
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Insert newline at end
    
  • edd9a84c
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Rebase and cleanup
    
  • 1cf8e2ed
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Fix antialiasing
    
  • 2fc3e384
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Free memory after use
    
  • 5424f47e
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Invert bitmap pitch
    
  • f6bd130b
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Remove redundant code
    
  • 3d0e33d2
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Almost fix rendering
    
  • 0b682c54
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Add SIMD
    
  • 2d83cd7d
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Start fixed point migration
    
  • 7adc6794
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Fixed point: added minmax and changed array type
    
  • 9433b8ea
    by Anurag Thakur at 2022-10-04T03:16:11+05:30
    Fixed point: converted drawline to fixed
    

30 changed files:

The diff was not included because it is too large.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]