[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Ve-uU9OfyTNUdP=nvEt0SoSWpeKofZ2pWz_J9PDdmJ1Zg@mail.gmail.com>
Date: Sat, 10 Aug 2024 18:41:53 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Justin Stitt <justinstitt@...gle.com>
Cc: Kees Cook <kees@...nel.org>, Andy Shevchenko <andy@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>, linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH] lib/string_helpers: rework overflow-dependent code
On Sat, Aug 10, 2024 at 6:39 PM Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
> On Sat, Aug 10, 2024 at 2:53 AM Justin Stitt <justinstitt@...gle.com> wrote:
> > On Fri, Aug 09, 2024 at 02:07:57PM GMT, Andy Shevchenko wrote:
...
> > But, we could do this too:
> > - while (*src && --size) {
> > - if (src[0] == '\\' && src[1] != '\0' && size > 1) {
> This one is worse, I think.
> Let's take time and not hurry up and think more about better approaches.
Btw, have you played with the "do {} while (size);" approach?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists