diff options
author | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-01-23 11:38:30 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-01-23 11:38:30 +0000 |
commit | 70219213d3e9404a95844f567d6d6b44753d8dad (patch) | |
tree | a0190892e271bb2852db051a2c29717084906c2e /src/sync-mode.c | |
parent | 5943d1ddb9ee51b80d353ab9dd2cf80d1202e328 (diff) | |
download | conntrack-tools-70219213d3e9404a95844f567d6d6b44753d8dad.tar.gz conntrack-tools-70219213d3e9404a95844f567d6d6b44753d8dad.zip |
Max Kellermann <max@duempel.org>:
check if the received packet is large enough
Minor changes by the committer
Diffstat (limited to 'src/sync-mode.c')
-rw-r--r-- | src/sync-mode.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sync-mode.c b/src/sync-mode.c index 4f7833c..f726272 100644 --- a/src/sync-mode.c +++ b/src/sync-mode.c @@ -99,6 +99,11 @@ static void mcast_handler(void) while (remain > 0) { struct nethdr *net = (struct nethdr *) ptr; + if (remain < NETHDR_SIZ) { + STATE(malformed)++; + break; + } + if (ntohs(net->len) > remain) { dlog(LOG_ERR, "fragmented messages"); break; |