Skip to Content [alt-c]
In reply to How to Crash Systemd in One Tweet
In some parts of SystemD they seem to use "bad coding practices from textbook":
} else if (startswith(option, "keyfile-offset=")) {
if (safe_atou(option+15, &arg_keyfile_offset) < 0) { log_error("keyfile-offset= parse failure, ignoring."); return 0; }
Do you see "option+15"? "15" here is a magic number, denoting the length of "keyfile-offset=":
https://cgit.freedesktop.org/systemd/systemd/tree/src/cryptsetup/cryptsetup.c#n106
Reply
Your comment will be public. To contact me privately, email me. Please keep your comment polite, on-topic, and comprehensible. Your comment may be held for moderation before being published.
Your Name: (Optional; will be published)
Your Email Address: (Optional; will not be published)
Your Website: (Optional; will be published)
>
monospaced
Post a Reply
Your comment will be public. To contact me privately, email me. Please keep your comment polite, on-topic, and comprehensible. Your comment may be held for moderation before being published.