mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
libcli/echo: validate the message length
metze
This commit is contained in:
parent
83ed9b52e7
commit
cc93a3004e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user