public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Subject: Re: [PATCH] name_count array overrun
Date: Thu, 7 Sep 2006 16:53:22 -0400	[thread overview]
Message-ID: <200609071653.22195.sgrubb@redhat.com> (raw)
In-Reply-To: <20060907204322.GA12003@fc.hp.com>

On Thursday 07 September 2006 16:43, Amy Griffis wrote:
> What about this conditional, which translates to context->name_count >= 13?
> Leaving the code as is means we'll never reach the new printk below,
> where context->name_count == 19.

Good point, I'll drop that part.

> > -             idx = context->name_count++;
> > +             idx = context->name_count;
> > +             if (context->name_count == (AUDIT_NAMES - 1)) {
> > +                     printk(KERN_DEBUG
> > +                             "name_count maxed and losing entry
> > [%d]=%s\n", +                             context->name_count,
> > +                             context->names[context->name_count].name ?:
> > +                             "(null)");
>
> Did you consider just dropping any data encountered after we've filled
> AUDIT_NAMES, instead of copying over the data for the last element?

That might be better. Is this the way we want to handle it? If there's no 
objections, I'll repost a patch tomorrow.

Thanks,
-Steve

  reply	other threads:[~2006-09-07 20:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-07 18:00 [PATCH] name_count array overrun Steve Grubb
2006-09-07 20:43 ` Amy Griffis
2006-09-07 20:53   ` Steve Grubb [this message]
2006-09-24 12:56   ` Steve Grubb
2006-09-27 21:04     ` Amy Griffis
  -- strict thread matches above, loose matches on Subject: below --
2006-09-28 18:31 Steve Grubb
2006-09-29 12:46 ` Alexander Viro

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=200609071653.22195.sgrubb@redhat.com \
    --to=sgrubb@redhat.com \
    --cc=linux-audit@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