]> git.ipfire.org Git - thirdparty/systemd.git/commit
coredump: cescape invalid json data before logging
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 13 Dec 2022 10:15:17 +0000 (11:15 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 13 Dec 2022 16:37:19 +0000 (01:37 +0900)
commitc5966ab5bf43b4fb45998760beaffa6c7f9e8a9e
tree39c9530823188bde813f60f07a95a429a76d0f29
parente4970f5dae9657ef18abeaf0990afb47bda407e2
coredump: cescape invalid json data before logging

In both cases, the json string is short, so we can print it, which is useful
for diagnosing invalid data in packages. But we need escape non-printable
characters.

https://bugzilla.redhat.com/show_bug.cgi?id=2152685

I went over the rest of the codebase, and it seems that other calls to
json_parse() don't have this problem.
src/coredump/coredumpctl.c
src/shared/elf-util.c