From a2ecd2a8241e1063073e79d949ef6d1e553513b1 Mon Sep 17 00:00:00 2001 From: Jaco Kroon Date: Thu, 26 Oct 2023 11:52:27 +0200 Subject: [PATCH] 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 --- pppd/plugins/radius/radattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.39.2