Re: [PATCH v1 2/3] lib/string_helpers: Change returned value of the strreplace()

From: Kees Cook
Date: Wed Mar 22 2023 - 12:51:51 EST


On Wed, Mar 22, 2023 at 04:12:05PM +0200, Andy Shevchenko wrote:
> It's more useful to return the original string with strreplace(),

I found the use of "original" confusing here and in the comments. This
just returns arg 1, yes? i.e. it's not the original (unreplaced) string,
but rather just the string itself.

I agree, though, that's much more useful than a pointer to the end of
the string.

-Kees

--
Kees Cook