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

Bartosz Golaszewski brgl at bgdev.pl
Fri May 9 12:40:26 UTC 2025


On Thu, May 8, 2025 at 3:07 PM Markus Burri <markus.burri at mt.com> 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 <markus.burri at mt.com>
> ---

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


More information about the dri-devel mailing list