# zstandard: fix incorrect RLE decompression into ring buffer · gitcafe/zig

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

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

Visibility: public

Requested revision: f6de3ec963e3a7d96cd4f6c72b0f076f0437c45d

Requested commit: f6de3ec963e3a7d96cd4f6c72b0f076f0437c45d

Commit: f6de3ec963e3a7d96cd4f6c72b0f076f0437c45d

Tree: 1bd456887034b6ac50355b4958208425fe807f2f

Author: dweiller

Committer: Andrew Kelley

## Message

```
zstandard: fix incorrect RLE decompression into ring buffer

This reverts a change introduced in #17400 causing a bug when
decompressing an RLE block into a ring buffer.

RLE blocks contain only a single byte of data to copy into the output,
so attempting to copy a slice causes buffer overruns and incorrect
decompression.

```

## Parents

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

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