diff options
author | Dmitry Kovalenko <d.kovalenko@samsung.com> | 2014-09-03 15:11:57 +0400 |
---|---|---|
committer | Dmitry Kovalenko <d.kovalenko@samsung.com> | 2014-09-03 15:13:29 +0400 |
commit | e49bce20251ddcc251bac7a4160956ce9388cc14 (patch) | |
tree | 3ecadb249c125b0cb7de72aee8c632ce51b5eadc | |
parent | 8b0d47e3601c79f24d9372d72b9575d90db42950 (diff) | |
download | swap-manager-e49bce20251ddcc251bac7a4160956ce9388cc14.tar.gz swap-manager-e49bce20251ddcc251bac7a4160956ce9388cc14.tar.bz2 swap-manager-e49bce20251ddcc251bac7a4160956ce9388cc14.zip |
[FIX] Prevent issue
Change-Id: I0b39c2f283a3beb08cbfbb818e301252a40440ca
Signed-off-by: Dmitry Kovalenko <d.kovalenko@samsung.com>
-rw-r--r-- | daemon/daemon.c | 2 |
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"); |