]> arthur.barton.de Git - netatalk.git/commitdiff
Return pointer to static array instead of array on stack
authorFrank Lahm <franklahm@googlemail.com>
Tue, 14 Sep 2010 13:05:24 +0000 (15:05 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Tue, 14 Sep 2010 13:05:24 +0000 (15:05 +0200)
etc/afpd/uam.c

index 3bb636f7ece899a0b0a3846b9fad32d92fb47673..532a620155f7c748835f32a83a53aa882cdc6575 100644 (file)
@@ -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)