From: Jaco Kroon Date: Thu, 26 Oct 2023 09:52:27 +0000 (+0200) Subject: plugins/radius: fix segfault during shutdown. (#455) X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=a2ecd2a8241e1063073e79d949ef6d1e553513b1 plugins/radius: fix segfault during shutdown. (#455) 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: #454 Signed-off-by: Jaco Kroon --- diff --git a/pppd/plugins/radius/radattr.c b/pppd/plugins/radius/radattr.c index 8db94da..802cb66 100644 --- a/pppd/plugins/radius/radattr.c +++ b/pppd/plugins/radius/radattr.c @@ -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); }