Skip to Content [alt-c]

Andrew Ayer


How to Crash Systemd in One Tweet

Comment by Reader Andrey Bergman

This comment is owned by whoever posted it. I am not responsible for it in any way.

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=":

| Posted on 2016-09-29 at 18:38:50 UTC by Reader Andrey Bergman | Reply to This

Post a Reply

Your comment will be public. If you would like to contact me privately, please email me. Please keep your comment on-topic, polite, and comprehensible. Use the "Preview" button to make sure your comment is properly formatted. Name and email address are optional. If you specify an email address it will be kept confidential.

Post Comment

(Optional; will be published)

(Optional; will not be published)

(Optional; will be published)

  • Blank lines separate paragraphs.
  • Lines starting with ">" are indented as block quotes.
  • Lines starting with two spaces are reproduced verbatim.
  • Text surrounded by *asterisks* is italicized.
  • Text surrounded by `back ticks` is monospaced.
  • URLs are turned into links.