mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 15:05:27 +08:00
tinyexpr: Reserve arity parameters
This somehow fixes heap-buffer-overflow? I thought this was supposed to be safe.
This commit is contained in:
parent
2e11e6c692
commit
e33d29a5d8
@ -65,6 +65,8 @@ public:
|
||||
default: arity = 0;
|
||||
}
|
||||
|
||||
parameters.reserve(arity);
|
||||
|
||||
// We allow filling the parameters later.
|
||||
if (params) {
|
||||
for (int i = 0; i < arity; i++) parameters.push_back(params[i]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user