diff options
author | Jordan Rupprecht <rupprecht@google.com> | 2024-04-01 16:02:12 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-01 16:02:12 -0500 |
commit | a6caceed8d27d4ebd44c517c3114a36a64ebddfe (patch) | |
tree | add9c4b8169c216e9d1d7d9086db4bc98bb3357a /clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp | |
parent | f2f01f6b03aa81d5bdbf841a88f8853620c6902b (diff) | |
download | llvm-a6caceed8d27d4ebd44c517c3114a36a64ebddfe.zip llvm-a6caceed8d27d4ebd44c517c3114a36a64ebddfe.tar.gz llvm-a6caceed8d27d4ebd44c517c3114a36a64ebddfe.tar.bz2 |
[lldb] Don't crash when attempting to parse breakpoint id `N.` as `N.*` (#87263)
We check if the next character after `N.` is `*` before we check its
length. Using `split` on the string is cleaner and less error prone than
using indices with `find` and `substr`.
Note: this does not make `N.` mean anything, it just prevents assertion
failures. `N.` is treated the same as an unrecognized breakpoint name:
```
(lldb) breakpoint enable 1
1 breakpoints enabled.
(lldb) breakpoint enable 1.*
1 breakpoints enabled.
(lldb) breakpoint enable 1.
0 breakpoints enabled.
(lldb) breakpoint enable xyz
0 breakpoints enabled.
```
Found via LLDB fuzzers.
Diffstat (limited to 'clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp')
0 files changed, 0 insertions, 0 deletions