diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2015-06-18 22:40:12 +0200 |
---|---|---|
committer | Philipp Gesang <phg@phi-gamma.net> | 2015-06-18 22:40:21 +0200 |
commit | 54d4d86d58c301785b9d5859faadd2ad11537bc2 (patch) | |
tree | 099b6ef63dfd26686cc64bf728aa394f179b31ee /src | |
parent | 86085b2cc984672d81cb833a99558fce25eb094f (diff) | |
download | luaotfload-54d4d86d58c301785b9d5859faadd2ad11537bc2.tar.gz |
[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.
Diffstat (limited to 'src')
-rw-r--r-- | src/luaotfload-parsers.lua | 25 |
1 files changed, 14 insertions, 11 deletions
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 |