From cd16c16ac85d0bfa460f51178da0334d8f34a836 Mon Sep 17 00:00:00 2001 From: Joe Marcus Clarke Date: Sat, 10 Feb 2007 06:13:23 +0000 Subject: Fix the build on systems with malloc debugging enabled by making sure a struct is properly initialized to 0. --- net/wireshark/files/patch-tools_lemon_lemon.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 net/wireshark/files/patch-tools_lemon_lemon.c (limited to 'net/wireshark') diff --git a/net/wireshark/files/patch-tools_lemon_lemon.c b/net/wireshark/files/patch-tools_lemon_lemon.c new file mode 100644 index 000000000000..3fbd409974c8 --- /dev/null +++ b/net/wireshark/files/patch-tools_lemon_lemon.c @@ -0,0 +1,10 @@ +--- tools/lemon/lemon.c.orig Sat Feb 10 01:09:11 2007 ++++ tools/lemon/lemon.c Sat Feb 10 01:09:33 2007 +@@ -2146,6 +2146,7 @@ to follow the previous rule."); + struct rule *rp; + rp = (struct rule *)malloc( sizeof(struct rule) + + sizeof(struct symbol*)*psp->nrhs + sizeof(char*)*psp->nrhs ); ++ memset(rp, 0, sizeof(struct rule)); + if( rp==0 ){ + ErrorMsg(psp->filename,psp->tokenlineno, + "Can't allocate enough memory for this rule."); -- cgit v1.2.3