diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-09-21 22:18:10 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-09-22 04:31:06 +0200 |
commit | cc93a3004e1f7a38e7519ecd124a1ce6a21ffe1c (patch) | |
tree | 1dac436eed81399a50037ddd05343a7fc45fe273 /libcli | |
parent | 83ed9b52e75215e7590f842fa7c1ec1a4e4aa6bc (diff) | |
download | samba-cc93a3004e1f7a38e7519ecd124a1ce6a21ffe1c.tar.gz samba-cc93a3004e1f7a38e7519ecd124a1ce6a21ffe1c.tar.bz2 samba-cc93a3004e1f7a38e7519ecd124a1ce6a21ffe1c.zip |
libcli/echo: validate the message length
metze
Diffstat (limited to 'libcli')
-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); |