soc: qcom: minidump: Fix -Wstrlcpy-strlcat-size

Extracted from I54b58226e3d6de0b674ac4ca1407138d1c9707e8

../drivers/soc/qcom/msm_minidump.c:521:39: warning: size argument in 'strlcpy' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size]
  521 |         strlcpy(banner, linux_banner, strlen(linux_banner) + 1);
      |                                       ~~~~~~~^~~~~~~~~~~~~~~~~
1 warning generated.

Change-Id: I43fa5006150dd402405f8c942571f08da0eb714a
Signed-off-by: Alexander Winkowski <[email protected]>
This commit is contained in:
Alexander Winkowski 2024-03-04 18:53:37 +00:00
commit d6254684dc
No known key found for this signature in database
GPG key ID: 72762A66704CDE44

View file

@ -518,7 +518,7 @@ static int msm_minidump_add_header(void)
/* 4th section is linux banner */
banner = (char *)ehdr + strtbl_off + MAX_STRTBL_SIZE;
strlcpy(banner, linux_banner, strlen(linux_banner) + 1);
strlcpy(banner, linux_banner, MAX_STRTBL_SIZE);
shdr->sh_type = SHT_PROGBITS;
shdr->sh_offset = (elf_addr_t)(strtbl_off + MAX_STRTBL_SIZE);