xserver/hw/xfree86/parser
liuheng 9e376b9f6a 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>
(cherry picked from commit 9b6f72395a)
2026-01-25 10:40:02 -08: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 2026-01-25 10:40:02 -08:00
Device.c xfree86: parser: rename IOBASE for fixing name conflict 2026-01-25 10:39:58 -08:00
DRI.c Fix a double-free on syntax error without a new line. 2026-01-25 10:39:56 -08:00
Extensions.c Fix a double-free on syntax error without a new line. 2026-01-25 10:39:56 -08:00
Files.c config: Preserve section data when parsing duplicate files 2026-01-25 10:40:02 -08:00
Flags.c config: Preserve section data when parsing duplicate files 2026-01-25 10:40:02 -08:00
Input.c Fix a double-free on syntax error without a new line. 2026-01-25 10:39:56 -08:00
InputClass.c Fix a double-free on syntax error without a new line. 2026-01-25 10:39:56 -08:00
Layout.c Fix a double-free on syntax error without a new line. 2026-01-25 10:39:56 -08: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 2026-01-25 10:40:02 -08:00
Monitor.c Fix a double-free on syntax error without a new line. 2026-01-25 10:39:56 -08:00
OutputClass.c Fix a double-free on syntax error without a new line. 2026-01-25 10:39:56 -08:00
Pointer.c Fix a double-free on syntax error without a new line. 2026-01-25 10:39:56 -08:00
read.c config: Preserve section data when parsing duplicate files 2026-01-25 10:40:02 -08:00
scan.c xfree86: parser: scan: fix char signess mismatch 2026-01-25 10:39:57 -08:00
Screen.c Fix a double-free on syntax error without a new line. 2026-01-25 10:39:56 -08:00
Vendor.c Fix a double-free on syntax error without a new line. 2026-01-25 10:39:56 -08:00
Video.c Fix a double-free on syntax error without a new line. 2026-01-25 10:39:56 -08:00
write.c xfree86: parser: drop HAS_NO_UIDS 2026-01-19 12:32:19 -08:00
xf86Optrec.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xf86Parser.h xfree86: Remove Option "BiosBase" (v2) 2017-02-16 11:34:46 -05:00
xf86tokens.h xfree86: parser: rename IOBASE for fixing name conflict 2026-01-25 10:39:58 -08:00