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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZJ1NYFtTJ/9CZ0qU@smile.fi.intel.com>
Date:   Thu, 29 Jun 2023 12:22:40 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Alexander Potapenko <glider@...gle.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        kasan-dev@...glegroups.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org,
        Andrey Ryabinin <ryabinin.a.a@...il.com>,
        Andrey Konovalov <andreyknvl@...il.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Vincenzo Frascino <vincenzo.frascino@....com>
Subject: Re: [PATCH v1 1/1] kasan: Replace strreplace() with strchrnul()

On Wed, Jun 28, 2023 at 05:39:26PM +0200, Alexander Potapenko wrote:
> On Wed, Jun 28, 2023 at 5:34 PM Andy Shevchenko
> <andriy.shevchenko@...ux.intel.com> wrote:

...

> >                 /* Strip line number; without filename it's not very helpful. */
> > -               strreplace(token, ':', '\0');
> > +               p[strchrnul(token, ':') - token] = '\0';
> 
> Why not just
>    *(strchrnul(token, ':')) = '\0';
> ?

I don't like Pythonish style in the C. But if you insist, I can update it.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ