Hi Tim,

On Mon, Apr 05, 2021 at 05:53:53PM +0200, Tim Duesterhus wrote:
> Willy,
> 
> some more `ist` helper functions that allows consumers to avoid directly
> operating on the raw pointer, instead using safe high level functions.
> 
> These will be used in a future series of mine. I'm sending them for early
> review and integration, because I believe their existence is useful on its
> own.

Overall it all looks good so I've merged it. I'd just have one small
request regarding istappend(), it's the first really unsafe function
we have in this collection that could be used inside a loop and cause
buffer overflows, especially since ist strings are designed to be
easier to use than plain strings (i.e. users care less). I'm prefectly
fine with having unsafe functions but not with a default name, so I'd
rather have __istappend() that the caller knows he wants to use and
takes the responsibility for, and istappend() that adds the length
check against an extra argument "size" as a few other functions do
in this case (e.g. istcat() uses a count argument for this).

No emergency but since I guess you're using them in your code, it would
be nice that your first caller uses either a secured or explicit version.

Thanks!
Willy

Reply via email to