# Re: \[PATCH v4 4/6\] gpio: fix potential out-of-bound write

- From: Bartosz Golaszewski \<hidden\>
- Date: 2025-05-09 12:40:39 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2025/05/3049022
- Thread: https://ratatoskr.run/linuxppc-dev/2025/05/3047176/t.md

```text
On Thu, May 8, 2025 at 3:07 PM Markus Burri [ref] wrote:
>
> Check that the input size does not exceed the buffer size.
> If a caller write more characters, count is truncated to the max available
> space in "simple_write_to_buffer".
> Write a zero termination afterwards.
>
> Signed-off-by: Markus Burri <redacted>
> ---

Looks good and does fix an issue that can be easily reproduced with
KASAN enabled. Please fix the issues reported by the build bot and
resend (as a patch separate from the rest of this series). Thanks.

Bartosz

```
