mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-11-30 16:48:21 +01:00
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.
23 lines
687 B
C
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)
|