All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH v2] dmesg: fix segfault
Date: Mon, 18 Jul 2011 23:47:47 +0200	[thread overview]
Message-ID: <20110718214747.GA4354@nb.redhat.com> (raw)
In-Reply-To: <CACpTwpHENHMCSxkh4a-Z5SHVifa=M7ai2XNtfY1An2TiUPc84A@mail.gmail.com>

On Mon, Jul 18, 2011 at 07:37:22PM +0200, Marc-Antoine Perennou wrote:
> An element declared as size_t cannot be detected as negative (len < 0)
> is always false.
> This can lead to an infinite loop causing a segmentation fault.
> Check if len is equal to -1 or -2 instead
> 
> Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
> ---
>  sys-utils/dmesg.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

 Applied, thanks.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

      reply	other threads:[~2011-07-18 21:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-18 17:37 [PATCH v2] dmesg: fix segfault Marc-Antoine Perennou
2011-07-18 21:47 ` Karel Zak [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=20110718214747.GA4354@nb.redhat.com \
    --to=kzak@redhat.com \
    --cc=Marc-Antoine@Perennou.com \
    --cc=util-linux@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.