cvs commit: src/sbin/ifconfig ifconfig.c

Matthew Dillon dillon at apollo.backplane.com
Wed Mar 17 00:44:33 PST 2004


:>   Modified files:
:>     sbin/ifconfig        ifconfig.c=20
:>   Log:
:>   An strlcpy() in the last commit was unconditionally overwriting 'name'
:>   in the sysctl sdl scan, causing all ifconfig commands to always operate
:>   on the first interface.
:
:Unless you have changed the symantics of sdl_data to nul terminate the
:name, you should apply rev 1.94 from FreeBSD to this code.  It was
:pointed out to me that strlcpy isn't safe here because it scans the
:source until it hits a null.  In practice, this probalby doesn't matter,
:but in principle it could cause you to walk off into empty space.
:
:-- Brooks

    Will do.

					-Matt





More information about the Commits mailing list