diff options
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; |