DragonFly BSD
DragonFly commits List (threaded) for 2004-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/sbin/ifconfig ifconfig.c


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Mar 2004 00:43:53 -0800 (PST)

:>   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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]