diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-06-29 15:34:36 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-06-29 22:06:27 -0400 |
| commit | 54454fd0102af8b25dbc85751d37fd265380d920 (patch) | |
| tree | cdab71c06e0a8269fa3349c5b4b62be91d8cac4e /lib/libcxx/src/bind.cpp | |
| parent | 8f2f0d8f0805f10523ced7e6a166ce81a097a54a (diff) | |
| download | zig-54454fd0102af8b25dbc85751d37fd265380d920.tar.gz zig-54454fd0102af8b25dbc85751d37fd265380d920.zip | |
std.math.big.int: breaking API changes to prevent UAF
Many of the Managed methods accepted by-val parameters which could
reference Limb slices that became invalid memory after any
ensureCapacity calls. Now, Managed methods accept `*const Managed`
parameters so that if the function allows aliasing and the
ensure-capacity call resizes the Limb slice, it also affects the
aliased parameters, avoiding use-after-free bugs.
This is a breaking change that reduces the requirement for callsites to
manually make the ensure-capacity changes prior to calling many of the
Managed methods.
Closes #11897
Diffstat (limited to 'lib/libcxx/src/bind.cpp')
0 files changed, 0 insertions, 0 deletions
