News for hackers. Stuff that matters.
Re:Linux /proc/pid/stat parsing bugs by cryptonector on Thursday December 22, 2022 @12:39PM (#34096037)
The process name should have been last. Now parsers have to split on space and then take the first token and the last N-2 tokens to leave behind the tokens that make up the second field, then join those with spaces to reconstruct the second field (or use the length of the first and the offset of the third fields to re-parse the second).
Re:Linux /proc/pid/stat parsing bugs by tatref on Thursday December 22, 2022 @12:48PM (#34096149)
If you do this, then you can't add new fields
Re:Linux /proc/pid/stat parsing bugs by cryptonector on Thursday December 22, 2022 @02:06PM (#34097134)
Correct. I guess you could split on parens instead.