Re: [PATCH 1/8] Spi: sprd-adi: Getting panic reason before reboot
From: Mark Brown
Date: Tue Aug 15 2023 - 09:23:05 EST
On Tue, Aug 15, 2023 at 10:34:19AM +0800, Jiansheng Wu wrote:
> + if (strlen(reason) < PANIC_REASON_LEN_MAX)
> + memcpy(panic_reason, reason, strlen(reason));
> + else
> + memcpy(panic_reason, reason, PANIC_REASON_LEN_MAX);
There's length limited strcpy() variants for this.
Attachment:
signature.asc
Description: PGP signature