diff options
author | marcus <marcus@FreeBSD.org> | 2007-02-10 14:13:23 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2007-02-10 14:13:23 +0800 |
commit | 781f1b638dd3a01a50b9bc95fe55c74122332dff (patch) | |
tree | 66cd13a2ba44ff1aa81c63bc7481ef4452d6ab7a /net/wireshark | |
parent | 7cec0aff538bd1247a8696e8d885def0884191a2 (diff) | |
download | freebsd-ports-gnome-781f1b638dd3a01a50b9bc95fe55c74122332dff.tar.gz freebsd-ports-gnome-781f1b638dd3a01a50b9bc95fe55c74122332dff.tar.zst freebsd-ports-gnome-781f1b638dd3a01a50b9bc95fe55c74122332dff.zip |
Fix the build on systems with malloc debugging enabled by making sure
a struct is properly initialized to 0.
Diffstat (limited to 'net/wireshark')
-rw-r--r-- | net/wireshark/files/patch-tools_lemon_lemon.c | 10 |
1 files changed, 10 insertions, 0 deletions
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."); |