# std.math.big: fix use-after-free · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/b498eebfd450e7579dc8652d5827a23cc7070d9d)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: b498eebfd450e7579dc8652d5827a23cc7070d9d

Requested commit: b498eebfd450e7579dc8652d5827a23cc7070d9d

Commit: b498eebfd450e7579dc8652d5827a23cc7070d9d

Tree: de5346194d4667905303d35509ec2d6a9f721f8b

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.math.big: fix use-after-free

When there is parameter aliasing, the ensureCapacity calls can cause the
Const parameters to become dangling pointers.

See #6167

```

## Parents

- [973e6c978cedacc9aab86999ab67e5066fc1db1d](https://git.cafe/gitcafe/zig/commit/973e6c978cedacc9aab86999ab67e5066fc1db1d?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/b498eebfd450e7579dc8652d5827a23cc7070d9d?format=markdown)
