public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfsprogs: avoid array overflow in pf_batch_read()
Date: Mon, 2 Sep 2013 20:14:58 +1000	[thread overview]
Message-ID: <20130902101458.GF12779@dastard> (raw)
In-Reply-To: <522017A4.8060400@redhat.com>

On Thu, Aug 29, 2013 at 10:55:16PM -0500, Eric Sandeen wrote:
> The while loop in pf_batch_read, and the code preceeding it, is really...
> quite a thing.  I'd love to rewrite it, but I haven't yet found
> a particularly cleaner way.
> 
> It cleverly hides the fact that we might increment "num" past the
> last index of bplist[] and then assign to it.  This corrupts memory.
> 
> Rather than major surgery for now, just go for the simple fix,
> and break out of the loop if we've increased "num" past the
> last index.

looks good.

Reviewed-by: Dave Chinner <dchinner@redhat.com>

-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2013-09-02 10:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-30  3:55 [PATCH] xfsprogs: avoid array overflow in pf_batch_read() Eric Sandeen
2013-09-02 10:14 ` Dave Chinner [this message]
2013-10-18 16:29 ` Rich Johnston

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=20130902101458.GF12779@dastard \
    --to=david@fromorbit.com \
    --cc=sandeen@redhat.com \
    --cc=xfs@oss.sgi.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