Files
Liu d57350e286 fix(ui-xml): resource node should reject missing type attribute
ui_builder_parse_resource_node() only rejected the case where both
type and src were absent, then passed a NULL type to strstr(). Require
type before dispatching on it, release attributes through the existing
exit path, and check src before loading a font.

Fixes GHSA-xr82-f9q8-h384.
2026-11-24 21:49:20 +08:00

30 lines
886 B
Lua

add_requires("libxml2", {optional = true})
target("libui-xml")
set_version("1.0.0")
add_packages("libxml2")
if has_package("libxml2") then
set_configvar("LIBUI_XML_HAS_LIBXML2", 1)
end
set_kind("$(kind)")
add_files("src/**.c")
add_deps("yutil", "libui", "libcss", "pandagl")
set_configdir("include/ui_xml")
add_configfiles("src/config.h.in")
add_headerfiles("include/ui_xml.h", "include/(ui_xml/*.h)")
if is_kind("static") then
set_configvar("LIBUI_XML_STATIC_BUILD", 1)
elseif is_plat("windows") then
add_defines("LIBUI_XML_DLL_EXPORT")
end
target("libui-xml-tests")
set_default(false)
set_kind("binary")
set_group("tests")
set_rundir("tests/fixtures")
add_files("tests/*.c")
add_deps("ctest", "libui-xml")
add_rules("tests.runnable")
add_tests("default", {group = "tests"})