From 7fd8b4835789f4a9b2d6bb60b55eac445b9f744f Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 29 Aug 2025 11:00:43 -0700 Subject: [PATCH] Fix lvfontio memory allocation with fixed width fonts There was a branch of the loading that failed to set max_slots. This led to unpredicatable allocation failures. Fixes #10560 --- shared-module/lvfontio/OnDiskFont.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shared-module/lvfontio/OnDiskFont.c b/shared-module/lvfontio/OnDiskFont.c index 0cf65301d2270..368bd381475b1 100644 --- a/shared-module/lvfontio/OnDiskFont.c +++ b/shared-module/lvfontio/OnDiskFont.c @@ -253,9 +253,10 @@ static bool load_font_header(lvfontio_ondiskfont_t *self, FIL *file, size_t *max *max_slots = advance_count[1] * 2 + advance_count[0]; } } + } else { + *max_slots = advance_count[0] + advance_count[1]; } - found_glyf = true; }