git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
350d5ec
)
libcli/echo: validate the message length
author
Stefan Metzmacher
<metze@samba.org>
Fri, 21 Sep 2012 20:18:10 +0000
(22:18 +0200)
committer
Karolin Seeger
<kseeger@samba.org>
Fri, 28 Sep 2012 07:23:08 +0000
(09:23 +0200)
metze
libcli/echo/echo.c
patch
|
blob
|
history
diff --git
a/libcli/echo/echo.c
b/libcli/echo/echo.c
index b6005cb32c07f94f1024d01374a6f6ae0393e177..0f5f7f77b169de5f60e3c82854b85c13663bcdd7 100644
(file)
--- 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);