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

Re: if_xname ... here we go


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 5 Jan 2004 18:52:02 -0800 (PST)

    Whoop, found a bug.  In sys/emulation/linux/linux_ioctl.c
    this:

-               return (snprintf(buffer, buflen, "%s%d", ifp->if_name,
-                   ifp->if_unit));
+               return (strlcpy(buffer, ifp->if_xname, buflen) - 1);

    The strlcpy should just be:

+               return (strlcpy(buffer, ifp->if_xname, buflen));

    i.e. no '- 1'.

    Do you concur?

						-Matt




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