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

23 lines
687 B
C

/*
* lib/ui-xml/tests/main.c
*
* Copyright (c) 2026, Liu Chao <i@lc-soft.io> All rights reserved.
*
* SPDX-License-Identifier: MIT
*
* This file is part of LCUI, distributed under the MIT License found
* in the LICENSE.TXT file in the root directory of this source tree.
*/
#include <ctest.h>
extern void test_ui_xml_parser(void);
extern void test_ui_xml_resource_node(void);
static const ctest_suite_t suites[] = { { "ui-xml/parser", test_ui_xml_parser },
{ "ui-xml/resource node",
test_ui_xml_resource_node },
{ NULL, NULL } };
CTEST_MAIN(suites)