X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fplugins%2Fpppoe%2Fplugin.c;fp=pppd%2Fplugins%2Fpppoe%2Fplugin.c;h=92d049353c49b24b6bb81f295a37317cfd1cd778;hp=8443c920584d25be61e6aa5cdcb966c71fd45364;hb=d2330632fd4bdab5cf89bfdcce45eefd6fe34b97;hpb=bdd34ab1f2f87acb23c6d92feee7354ac53005ff diff --git a/pppd/plugins/pppoe/plugin.c b/pppd/plugins/pppoe/plugin.c index 8443c92..92d0493 100644 --- a/pppd/plugins/pppoe/plugin.c +++ b/pppd/plugins/pppoe/plugin.c @@ -37,6 +37,7 @@ static char const RCSID[] = #include #include #include +#include #include #include #include @@ -200,7 +201,7 @@ PPPOEConnectDevice(void) conn->acName = acName; conn->serviceName = pppd_pppoe_service; - strlcpy(ppp_devnam, devnam, sizeof(ppp_devnam)); + strlcpy(ppp_devnam, devnam, MAXPATHLEN); if (existingSession) { unsigned int mac[ETH_ALEN]; int i, ses; @@ -395,7 +396,7 @@ PPPoEDevnameHook(char *cmd, char **argv, int doit) /* Close socket */ close(fd); if (r && doit) { - strlcpy(devnam, cmd, sizeof(devnam)); + strlcpy(devnam, cmd, MAXPATHLEN); if (the_channel != &pppoe_channel) { the_channel = &pppoe_channel;