Skip to content

Fix buffer underrun and overrun in FontFileMakeDir

Peter Harris requested to merge peterh/libxfont:master into master

When dirName is "" (eg. when called by BuiltinReadDirectory), FontFileMakeDir would read before the string (on all platforms) and after the string (when WIN32 is defined).

Fix the underrun issue by checking the string length before subtracting one. Fix the overrun issue by checking the location of the found : before adding two.

Signed-off-by: Peter Harris pharris@opentext.com

Merge request reports