From 1fefd5c66402077428db0b5d42bd0986f3efe16a Mon Sep 17 00:00:00 2001 From: Frank Lahm Date: Tue, 14 Sep 2010 15:05:24 +0200 Subject: [PATCH] Return pointer to static array instead of array on stack --- etc/afpd/uam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/afpd/uam.c b/etc/afpd/uam.c index 3bb636f7..532a6201 100644 --- a/etc/afpd/uam.c +++ b/etc/afpd/uam.c @@ -428,7 +428,7 @@ int uam_afpserver_option(void *private, const int what, void *option, { struct DSI *dsi = obj->handle; const struct sockaddr *sa; - char hbuf[NI_MAXHOST]; + static char hbuf[NI_MAXHOST]; sa = (struct sockaddr *)&dsi->client; if (getnameinfo(sa, sizeof(dsi->client), hbuf, sizeof(hbuf), NULL, 0, 0) == 0) -- 2.39.2