Re: [PATCH v3 2/2] wifi: nxpwifi: bound debug info output

From: Jeff Chen

Date: Mon Sep 21 2026 - 05:04:06 EST


On Sat, Sep 19, 2026 at 12:44:39 PM +0800, Heyang Tan wrote:
> nxpwifi_debug_read() provides a PAGE_SIZE buffer to
> nxpwifi_debug_info_to_buffer(), which formats debug state with
> unbounded sprintf() calls. The same helper is also used for the firmware
> dump.
>
> Pass the output size to the helper and use scnprintf() while formatting.
> Clamp the debug table counts and window size to the backing array lengths
> before accessing them.
>

Reviewed-by: Jeff Chen <jeff.chen_1@xxxxxxx>