Hi Tim, On Mon, Nov 08, 2021 at 09:04:59AM +0100, Tim Duesterhus wrote: > Hi Willy, > > find my (probably :-) ) final CLEANUP series for 2.5. > > Regarding the final patch: > > 'chunk_strncat()' appears to be completely redundant, it simply passes through > the arguments and even takes an int instead of a size_t. Should it be removed?
You're totally right. Not only it is redundant, but it is wrong (which is why it is redundant). By being called strncat() one would hope that it never copies more than the source, but here it ignores the source's size and always takes the len argument. I suggest that we replace it with chunk_memcat() everywhere and remove it to avoid any issue. At first glance for now this is harmless, fortunately, but for how long? Willy

