diff --git a/exec/totemsrp.c b/exec/totemsrp.c index 9f72e668..d7258d93 100644 --- a/exec/totemsrp.c +++ b/exec/totemsrp.c @@ -4042,7 +4042,12 @@ void main_deliver_fn ( log_printf (instance->totemsrp_log_level_security, "Received message is too short... ignoring %d.\n", msg_len); return; } - + + if ((int)message_header->type >= totemsrp_message_handlers.count) { + log_printf (instance->totemsrp_log_level_security, "Type of received message is wrong... ignoring %d.\n", (int)message_header->type); + return; + } + /* * Handle incoming message */