Unverified Commit 60014557 by Christian Brauner Committed by GitHub

Merge pull request #2803 from Rachid-Koucha/patch-4

Avoid risk of "too far memory read"
parents f87c3a22 71fc9c04
...@@ -896,7 +896,7 @@ static int lxc_cmd_add_state_client_callback(int fd, struct lxc_cmd_req *req, ...@@ -896,7 +896,7 @@ static int lxc_cmd_add_state_client_callback(int fd, struct lxc_cmd_req *req,
if (req->datalen < 0) if (req->datalen < 0)
goto reap_client_fd; goto reap_client_fd;
if (req->datalen > (sizeof(lxc_state_t) * MAX_STATE)) if (req->datalen != (sizeof(lxc_state_t) * MAX_STATE))
goto reap_client_fd; goto reap_client_fd;
if (!req->data) if (!req->data)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment