bohoomil / fontconfig-ultimate

freetype2-infinality run-time settings => infinality compatible fontconfig => infinality-bundle
453 stars 38 forks source link

crash with certain (buggy?) fonts #138

Closed mviikki16 closed 8 years ago

mviikki16 commented 8 years ago

Some fonts seem to be lacking the style_name property which causes a crash in af_latin_compute_stem_width function with infinality updates.

This is fixed with the patch below (applied on top of a5952d3049ff880bb8eea94f045b32575e59b58f from master with merged infinality but it's small enough to work at any level).

However, there might be other unchecked uses of strstr, no time to investigate on them but I'll do it if I still see such crashes. In my case the problem occurred when browsing web-pages requiring affected fonts (perhaps this is a font problem to start with, but I had no time to identify which font(s) trigger it).

sigseg_strstr.txt

bohoomil commented 8 years ago

Done. Thank you very much for the patch!