]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
Remove LOCAL_COPY (and thus alloca) usage from /who.
authorJilles Tjoelker <redacted>
Sat, 8 Nov 2008 23:13:48 +0000 (00:13 +0100)
committerJilles Tjoelker <redacted>
Sat, 8 Nov 2008 23:13:48 +0000 (00:13 +0100)
modules/m_who.c

index 2175fcc5c003adc4d84946c30b91be5b72547635..b5357e78a40031f9cfea629b2960a52cc552fb21 100644 (file)
@@ -102,6 +102,7 @@ m_who(struct Client *client_p, struct Client *source_p, int parc, const char *pa
        int operspy = 0;
        struct who_format fmt;
        const char *s;
+       char maskcopy[512];
 
        fmt.fields = 0;
        fmt.querytype = NULL;
@@ -137,7 +138,8 @@ m_who(struct Client *client_p, struct Client *source_p, int parc, const char *pa
                        fmt.querytype = "0";
        }
 
-       mask = LOCAL_COPY(parv[1]);
+       strlcpy(maskcopy, parv[1], sizeof maskcopy);
+       mask = maskcopy;
 
        collapse(mask);