Re: [PATCH] util_lib/elf_info.c: fix a warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 21, 2024 at 03:30:37PM +0800, Baoquan He wrote:
> There's a incorrect array operation in function scan_vmcoreinfo(), it
> will cause below warning message.
> 
> -----------------------
> util_lib/elf_info.c: In function ‘scan_vmcoreinfo’:
> util_lib/elf_info.c:360:43: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
>   360 |                         temp_buf[len + 1] = '\0';
>       |                         ~~~~~~~~~~~~~~~~~~^~~~~~
> util_lib/elf_info.c:319:14: note: at offset 1024 into destination object ‘temp_buf’ of size 1024
>   319 |         char temp_buf[1024];
>       |              ^~~~~~~~
> ---------------------
> 
> Fix it to avoid oob access of array.
> 
> Signed-off-by: Baoquan He <bhe@xxxxxxxxxx>

Thanks, applied.

_______________________________________________
kexec mailing list
kexec@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/kexec




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux