summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--daemon/daemon.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/daemon/daemon.c b/daemon/daemon.c
index e264f74..d232a68 100644
--- a/daemon/daemon.c
+++ b/daemon/daemon.c
@@ -792,6 +792,8 @@ static int controlSocketHandler(int efd)
if (recv_len == -1 || recv_len == 0)
return -11;
else {
+ if (msg_head.len > RECV_BUF_MAX)
+ return -1;
msg = malloc(MSG_CMD_HDR_LEN + msg_head.len);
if (!msg) {
LOGE("Cannot alloc msg\n");