Closed melak closed 6 years ago
Looks good to me, although IMO strcat is fine because it's length checked, I don't really see the snprintf adding any benefit except to satisfy a naive code check.
Note that originally I used asprintf because life is too short but it was rejected because of a concern some platforms might lack it.
Yep, no argument about strcat being fine in this particular instance. What I'm after is making the "it's fine" bit more obvious, which is rarely possible with non-bounds-checked string functions, so.
Fair enough, like I said - looks like it should work to me.
Ok, looks good -- thanks.
Yes, I primarily just want to get rid of strcat (which is checked and appears to be OK, but still, it's 2018).
Also bring behaviour in line with manual and common expectations:
This is in line with both manual and common sense (otherwise one could have just used LD_LIBRARY_PATH).
Poke @DanielO