summaryrefslogtreecommitdiff
path: root/src/irmd/ipcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irmd/ipcp.c')
-rw-r--r--src/irmd/ipcp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/irmd/ipcp.c b/src/irmd/ipcp.c
index d7abe15d..5a9a79d3 100644
--- a/src/irmd/ipcp.c
+++ b/src/irmd/ipcp.c
@@ -107,7 +107,8 @@ ipcp_msg_t * send_recv_ipcp_msg(pid_t pid,
free(sock_path);
len = ipcp_msg__get_packed_size(msg);
- if (len == 0) {
+ if (len == 0 || len >= SOCK_BUF_SIZE) {
+ log_warn("IPCP message has invalid size: %zd.", len);
close(sockfd);
return NULL;
}