]> git.ipfire.org Git - thirdparty/systemd.git/commit
journalctl: do not directly use optarg, but copy optarg before use 34793/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 16 Oct 2024 10:34:18 +0000 (19:34 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 16 Oct 2024 14:06:42 +0000 (23:06 +0900)
commitce2b92e8b016a677ca60b233318127478e7c53cb
treedcf509919f55eb91d593ce8412fd3c494ebeb9c3
parentd0ad4e88d4e6b5e312c359a6505125f7e088f3e3
journalctl: do not directly use optarg, but copy optarg before use

Otherwise, if the process forks child processes, then the arguments
cannot be used from them.
To avoid potential issues like the one fixed by
6d3012bab4ce4c1ed260598d05b4e9f2ea471658.
src/journal/journalctl.c
src/journal/journalctl.h