xserver/hw/xfree86/parser
liuheng 9b6f72395a config: Preserve section data when parsing duplicate files
Previously, when parsing multiple configuration files containing the same
section names, only the last occurrence of each section would be retained.
Earlier definitions were silently discarded due to unconditional memory
allocation and overwriting of pointers during parsing.

This resulted in incomplete or incorrect configuration state when users
intended to merge or extend configuration through multiple files.

The section parsing functions in Files.c, Flags.c, and Module.c now
accept existing section pointers. These functions allocate new memory only
if the input pointer is NULL, preserving earlier data when re-parsing.

read.c has been updated to detect and pass existing section pointers when
encountering duplicate sections across files, preventing loss of prior content.

With these changes, the parser properly accumulates and merges configuration
data across multiple files, ensuring that all relevant settings are preserved.

Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/467
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2045>
2025-07-19 20:58:11 +00:00
..
Configint.h Fix spelling/wording issues 2020-07-05 13:07:33 -07:00
configProcs.h config: Preserve section data when parsing duplicate files 2025-07-19 20:58:11 +00:00
Device.c xfree86: parser: rename IOBASE for fixing name conflict 2025-02-06 16:05:00 +00:00
DRI.c Fix a double-free on syntax error without a new line. 2024-09-01 23:28:20 +00:00
Extensions.c Fix a double-free on syntax error without a new line. 2024-09-01 23:28:20 +00:00
Files.c config: Preserve section data when parsing duplicate files 2025-07-19 20:58:11 +00:00
Flags.c config: Preserve section data when parsing duplicate files 2025-07-19 20:58:11 +00:00
Input.c Fix a double-free on syntax error without a new line. 2024-09-01 23:28:20 +00:00
InputClass.c Fix a double-free on syntax error without a new line. 2024-09-01 23:28:20 +00:00
Layout.c Revert "xfree86: parser: move private defs from xf86Parser.h to xf86Parser_priv.h" 2025-06-19 16:03:01 +00:00
meson.build Add a Meson build system alongside autotools. 2017-04-26 15:25:27 -07:00
Module.c config: Preserve section data when parsing duplicate files 2025-07-19 20:58:11 +00:00
Monitor.c Fix a double-free on syntax error without a new line. 2024-09-01 23:28:20 +00:00
OutputClass.c Fix a double-free on syntax error without a new line. 2024-09-01 23:28:20 +00:00
Pointer.c Fix a double-free on syntax error without a new line. 2024-09-01 23:28:20 +00:00
read.c config: Preserve section data when parsing duplicate files 2025-07-19 20:58:11 +00:00
scan.c Revert "os: log: replace VErrorF() by LogVMessageVerb()" 2025-06-24 23:40:49 +00:00
Screen.c Fix a double-free on syntax error without a new line. 2024-09-01 23:28:20 +00:00
Vendor.c Fix a double-free on syntax error without a new line. 2024-09-01 23:28:20 +00:00
Video.c Fix a double-free on syntax error without a new line. 2024-09-01 23:28:20 +00:00
write.c Revert "xfree86: parser: move private defs from xf86Parser.h to xf86Parser_priv.h" 2025-06-19 16:03:01 +00:00
xf86Optrec.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xf86Parser.h Revert "xfree86: parser: move private defs from xf86Parser.h to xf86Parser_priv.h" 2025-06-19 16:03:01 +00:00
xf86tokens.h xfree86: parser: rename IOBASE for fixing name conflict 2025-02-06 16:05:00 +00:00