[BusyBox] save 22 binary bytes

Matt Kraai kraai at alumni.carnegiemellon.edu
Wed May 16 18:20:46 UTC 2001


On Wed, May 16, 2001 at 05:10:16PM -0700, Aaron Lehmann wrote:
> On Wed, May 16, 2001 at 04:46:24PM -0700, Larry Doolittle wrote:
> > Also, your changes should use safe_strncpy instead of strncpy.
> 
> strncpy should be as "safe" as snprintf was, unless there is some
> preexisting bug. But in principle, this probably a good idea.

Ah, the joys of stupid interfaces.  snprintf will always NUL
terminate its output.  strncpy will not.  safe_strncpy will.  Go
figure.

Matt





More information about the busybox mailing list