From 54d4d86d58c301785b9d5859faadd2ad11537bc2 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 18 Jun 2015 22:40:12 +0200 Subject: [parsers] fix tracking of included fontconfig files Addresses issue https://github.com/lualatex/luaotfload/issues/275 There indeed was a check missing for included files. Since a corresponding check for included directories was in effect it probably masked the potential stack blowthrough. --- src/luaotfload-parsers.lua | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'src/luaotfload-parsers.lua') diff --git a/src/luaotfload-parsers.lua b/src/luaotfload-parsers.lua index a9acd9f..a39d2cd 100644 --- a/src/luaotfload-parsers.lua +++ b/src/luaotfload-parsers.lua @@ -298,18 +298,21 @@ read_fonts_conf_indeed = function (start, end if lfsisfile(path) and kpsereadable_file(path) - and not done[path] then - --- we exclude path with texmf in them, as they should - --- be found otherwise - acc = read_fonts_conf_indeed(path, - home, - xdg_config_home, - xdg_data_home, - acc, - done, - dirs_done, - find_files) + if done[path] then + logreport("log", 3, "load", + "skipping file at %s, already included.", opt) + else + done[path] = true + acc = read_fonts_conf_indeed(path, + home, + xdg_config_home, + xdg_data_home, + acc, + done, + dirs_done, + find_files) + end elseif lfsisdir(path) then --- arrow code ahead local config_files = find_files (path, conf_filter) for _, filename in next, config_files do -- cgit v1.2.3