On Thu Oct 5 13:17:53 2023 +0000, Torge Matthies wrote:
I don't see how this could read past the end of the table, the size of the allocated memory is determined by `ClassRangeCount` in `load_GDEF` so all of this memory is allocated. I'm assuming that if the font section was too small, that `font_funcs->get_font_data` would return an error and thus `font->gdef_table` would be `NULL`, which is handled at the top of this function. Regardless, this should use a bsearch, I think I did it this way because I was initially copying some code for parsing a different table which used a for loop.
Right, it's allocated, so probably fine. Ultimately it does not have to be allocated, if we map the font already.