[Lldb-commits] [lldb] [lldb] Correct format specifier for sscanf to prevent buffer overflow (NFC) (PR #94783)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 24 04:46:39 PDT 2024
labath wrote:
> > The field this is consuming is actually 17 bytes long, because the process name is in parenthesis.
>
> Ok then I am confused how this ever worked, but it sounds like scanf was never a great way to do this anyway?
The field it's overwriting is in a struct, so it has a lot of headroom for "safely" overflowing without hitting anything important. And since the the other fields are parsed after the string field, they probably just immediately overwrite the corrupted data.
https://github.com/llvm/llvm-project/pull/94783
More information about the lldb-commits
mailing list