]> git.ipfire.org Git - thirdparty/systemd.git/commit
ansi-color: fix stack overflow with debug level and invalid SYSTEMD_COLORS env var
authorLuca Boccassi <luca.boccassi@gmail.com>
Wed, 10 Sep 2025 12:25:30 +0000 (13:25 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 12 Sep 2025 09:58:26 +0000 (10:58 +0100)
commitf82d80da067aa6c73c19ea84c0261db4961368c4
treeb2aff374a0c2371ace74abded3cce124e1b63680
parent6becea285941f5cc7980fb68431270f165945341
ansi-color: fix stack overflow with debug level and invalid SYSTEMD_COLORS env var

When SYSTEMD_COLORS is invalid, parse_systemd_colors() logs about it.
Logging helpers then call into parse_systemd_colors() to pretty-print
the log message, which then fails, so it logs about the failure,
rinse and repeat until segfault.

Follow-up for c8210d98a4b64af6fadb1cb765c0451758af1303
src/basic/ansi-color.c