mirror of
https://github.com/samba-team/samba.git
synced 2025-09-05 13:44:19 +03:00
libcli/echo: validate the message length
metze
This commit is contained in:
@@ -172,6 +172,11 @@ static void echo_request_done(struct tevent_req *subreq)
|
||||
return;
|
||||
}
|
||||
|
||||
if (len != state->orig_len) {
|
||||
tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
|
||||
return;
|
||||
}
|
||||
|
||||
state->message[len-1] = '\0';
|
||||
/* Once the async function has completed, set tevent_req_done() */
|
||||
tevent_req_done(req);
|
||||
|
Reference in New Issue
Block a user