Skip to content

Commit

Permalink
plugins/radius: fix segfault during shutdown. (ppp-project#455)
Browse files Browse the repository at this point in the history
ppp_get_ifname() is the wrong thing to use in this slprintf call as
it returns an int which is the length of the interface name, not
a pointer to the interface name, which is what ppp_ifname()
returns.

Closes: ppp-project#454

Signed-off-by: Jaco Kroon <jaco@uls.co.za>
  • Loading branch information
jkroonza authored Oct 26, 2023
1 parent 1480d43 commit a2ecd2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pppd/plugins/radius/radattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ cleanup(void *opaque, int arg)
{
char fname[512];

slprintf(fname, sizeof(fname), "/var/run/radattr.%s", ppp_get_ifname(NULL,0));
slprintf(fname, sizeof(fname), "/var/run/radattr.%s", ppp_ifname());
(void) remove(fname);
dbglog("RADATTR plugin removed file %s.", fname);
}

0 comments on commit a2ecd2a

Please sign in to comment.