lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180514022309.GA9220@sejong>
Date:   Mon, 14 May 2018 11:23:09 +0900
From:   Namhyung Kim <namhyung@...nel.org>
To:     Yann Ylavic <ylavic.dev@...il.com>
Cc:     Steven Rostedt <rostedt@...dmis.org>, linux-kernel@...r.kernel.org,
        Ingo Molnar <mingo@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Tom Zanussi <tom.zanussi@...ux.intel.com>,
        Clark Williams <williams@...hat.com>,
        Karim Yaghmour <karim.yaghmour@...rsys.com>,
        Brendan Gregg <bgregg@...flix.com>,
        Joel Fernandes <joelaf@...gle.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        linux-rt-users@...r.kernel.org, kernel-team@....com
Subject: Re: [RFC][PATCH 07/10] tracing: Have zero size length in filter
 logic be full string

Hi,

On Sat, May 12, 2018 at 08:32:18PM +0200, Yann Ylavic wrote:
> On Fri, May 11, 2018 at 9:49 PM, Steven Rostedt <rostedt@...dmis.org> wrote:
> []
> >
> >  static int regex_match_front(char *str, struct regex *r, int len)
> >  {
> > -       if (len < r->len)
> > +       if (len && len < r->len)
> >                 return 0;
> >
> > -       if (strncmp(str, r->pattern, r->len) == 0)
> > -               return 1;
> > -       return 0;
> > +       return strncmp(str, r->pattern, len) == 0;
> 
> strncmp(..., r->len) still?

Yep, I think so.  Otherwise it'll always return true when len is 0.

Thanks,
Namhyung

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ