if_xname ... here we go

Matthew Dillon dillon at apollo.backplane.com
Mon Jan 5 18:52:37 PST 2004


    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






More information about the Submit mailing list