From: Simon Horman <horms@kernel.org>
To: Baoquan He <bhe@redhat.com>
Cc: kexec@lists.infradead.org
Subject: Re: [PATCH] util_lib/elf_info.c: fix a warning
Date: Fri, 22 Mar 2024 21:09:58 +0000 [thread overview]
Message-ID: <20240322210958.GC387537@kernel.org> (raw)
In-Reply-To: <20240321073037.823696-1-bhe@redhat.com>
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@redhat.com>
Thanks, applied.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
prev parent reply other threads:[~2024-03-22 21:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 7:30 [PATCH] util_lib/elf_info.c: fix a warning Baoquan He
2024-03-22 21:09 ` Simon Horman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240322210958.GC387537@kernel.org \
--to=horms@kernel.org \
--cc=bhe@redhat.com \
--cc=kexec@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox