[base] Fix a leak by broken sfnt-PS or resource fork (#46028).
open_face_from_buffer() frees passed buffer if valid font is not found. But if copying to the buffer is failed, the allocated buffer should be freed within the caller. * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Free the buffer `sfnt_ps' if an error caused before calling open_face_from_buffer(). (Mac_Read_sfnt_Resource): Free the buffer `sfnt_data' if an error caused before calling open_face_from_buffer();2.6.5
parent
8a05d250df
commit
fb5268cf7b
2 changed files with 20 additions and 2 deletions
Loading…
Reference in new issue