Commit 55d6061
authored
Fix NULL deref for invalid mangled input (swiftlang#31878)
The `Qo` operator expects to consume a type name and a list (terminated with a `y` empty list marker) from the stack. After popping the list, it doesn't check whether the stack is empty, so `$syQo` crashes (it pops down to the `y` then tries to pop again).
This PR just adds the obvious check to guard against this.
Resolves rdar://631283071 parent 028c59b commit 55d6061
File tree
2 files changed
+3
-0
lines changed- lib/Demangling
- test/Demangle/Inputs
2 files changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2019 | 2019 | | |
2020 | 2020 | | |
2021 | 2021 | | |
| 2022 | + | |
| 2023 | + | |
2022 | 2024 | | |
2023 | 2025 | | |
2024 | 2026 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| 361 | + | |
0 commit comments