git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
83ed9b5
)
libcli/echo: validate the message length
author
Stefan Metzmacher
<metze@samba.org>
Fri, 21 Sep 2012 20:18:10 +0000
(22:18 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Sat, 22 Sep 2012 02:31:06 +0000
(
04:31
+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);