From 8e0f260b041768fecb5df071c7ea08a43be6d39f Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sun, 9 Nov 2008 00:13:48 +0100 Subject: [PATCH] Remove LOCAL_COPY (and thus alloca) usage from /who. --- modules/m_who.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/m_who.c b/modules/m_who.c index 2175fcc..b5357e7 100644 --- a/modules/m_who.c +++ b/modules/m_who.c @@ -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);