# Reader.appendRemaining: Take ownership of the full allocated slice · gitcafe/zig

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

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

Visibility: public

Requested revision: 2b73c28cec9a5c75ab064f1ebd88b12aa64d22dd

Requested commit: 2b73c28cec9a5c75ab064f1ebd88b12aa64d22dd

Commit: 2b73c28cec9a5c75ab064f1ebd88b12aa64d22dd

Tree: 75d9a6f12c9349068068246a153537425d318988

Author: Ryan Liptak

Committer: Andrew Kelley

## Message

```
Reader.appendRemaining: Take ownership of the full allocated slice

Before this commit, calling appendRemaining with an ArrayList where list.items.len != list.capacity could result in illegal behavior if the Writer.Allocating resized the list during the appendRemaining call.

Fixes #25057

```

## Parents

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

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