From: Steve Dickson <steved@redhat.com>
To: Zhi Li <yieli@redhat.com>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH] [nfs/nfs-utils] rpcdebug: avoid buffer underflow if read() returns 0
Date: Wed, 5 Apr 2023 12:28:54 -0400 [thread overview]
Message-ID: <3661346d-da08-927e-fd76-20bdf6587c11@redhat.com> (raw)
In-Reply-To: <20230309062025.731671-1-yieli@redhat.com>
On 3/9/23 1:20 AM, Zhi Li wrote:
> Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2176740
>
> Signed-off-by: Zhi Li <yieli@redhat.com>
Committed... (tag: nfs-utils-2-6-3-rc7)
steved.
> ---
> tools/rpcdebug/rpcdebug.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/rpcdebug/rpcdebug.c b/tools/rpcdebug/rpcdebug.c
> index 68206cc5..ec05179e 100644
> --- a/tools/rpcdebug/rpcdebug.c
> +++ b/tools/rpcdebug/rpcdebug.c
> @@ -257,7 +257,7 @@ get_flags(char *module)
> perror(filename);
> exit(1);
> }
> - if ((len = read(sysfd, buffer, sizeof(buffer))) < 0) {
> + if ((len = read(sysfd, buffer, sizeof(buffer))) <= 0) {
> perror("read");
> exit(1);
> }
prev parent reply other threads:[~2023-04-05 16:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-09 6:20 [PATCH] [nfs/nfs-utils] rpcdebug: avoid buffer underflow if read() returns 0 Zhi Li
2023-04-05 16:28 ` Steve Dickson [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=3661346d-da08-927e-fd76-20bdf6587c11@redhat.com \
--to=steved@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=yieli@redhat.com \
/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