diff options
-rw-r--r-- | libcli/echo/echo.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libcli/echo/echo.c b/libcli/echo/echo.c index b6005cb32c..0f5f7f77b1 100644 --- a/libcli/echo/echo.c +++ b/libcli/echo/echo.c @@ -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); |