magiclantern_simplified icon indicating copy to clipboard operation
magiclantern_simplified copied to clipboard

rbf_font: sanitize loaded bitmap font before use (CONFIG_NO_BFNT)

Open kitor opened this issue 3 years ago • 0 comments

In 05a99a7c5f4c0723568382f629bb8b44a89dd7bb I blindly believe font file to be valid if just header magic matches.

bfnt_load_from_card should be updated to:

  • verify if loaded size > header size
  • parse header
  • count if maximum offset fits in loaded file

kitor avatar Sep 29 '21 18:09 kitor