From 677e103d1076760139b7b53527cac55f3ace55b3 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Sun, 26 Mar 2017 19:31:03 -0400 Subject: udpdump.c: warning C6262: Function uses '65608' bytes of stack: exceeds /analyze:stacksize '16384' Change-Id: I1d82c62dd30497db6a88ba3d3c973799ba7631ab Reviewed-on: https://code.wireshark.org/review/20730 Petri-Dish: Michael Mann Reviewed-by: Michael Mann --- extcap/udpdump.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'extcap') diff --git a/extcap/udpdump.c b/extcap/udpdump.c index 360d365d19..f6fe41a57c 100644 --- a/extcap/udpdump.c +++ b/extcap/udpdump.c @@ -304,7 +304,7 @@ static void run_listener(const char* fifo, const guint16 port, const char* proto struct sockaddr_in clientaddr; int clientlen = sizeof(clientaddr); socket_handle_t sock; - char buf[PKT_BUF_SIZE]; + char* buf; ssize_t buflen; FILE* fp = NULL; @@ -324,6 +324,7 @@ static void run_listener(const char* fifo, const guint16 port, const char* proto g_debug("Listener running on port %u", port); + buf = (char*)g_malloc(PKT_BUF_SIZE); while(run_loop == TRUE) { memset(buf, 0x0, PKT_BUF_SIZE); @@ -359,6 +360,7 @@ static void run_listener(const char* fifo, const guint16 port, const char* proto fclose(fp); closesocket(sock); + g_free(buf); } int main(int argc, char *argv[]) -- cgit v1.2.1