On Mon, Apr 19, 2021 at 4:01 PM Colin King <colin.k...@canonical.com> wrote:
>
> From: Colin Ian King <colin.k...@canonical.com>
>
> The size of the buffer than can be written to is currently incorrect, it is
> always the size of the entire buffer even though the snprintf is writing
> as position pos into the buffer. Fix this by setting the buffer size to be
> the number of bytes left in the buffer, namely sizeof(buf) - pos.
>
> Addresses-Coverity: ("Out-of-bounds access")
> Fixes: 7b0e2c4f6be3 ("wlcore: fix overlapping snprintf arguments in debugfs")
> Signed-off-by: Colin Ian King <colin.k...@canonical.com>

Acked-by: Arnd Bergmann <a...@arndb.de>

Reply via email to