summaryrefslogtreecommitdiff
path: root/libcli/echo
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-12-11 11:17:17 +0100
committerStefan Metzmacher <metze@samba.org>2010-12-11 13:48:54 +0100
commitaac0c58e04ac5f379fcfb0b3912d81f64f3652d2 (patch)
tree020160ad05c3a7254c9f0c46f2843ac260a33c33 /libcli/echo
parent21d02c0626577c213ae8cfb6ea684351e78ad511 (diff)
downloadsamba-aac0c58e04ac5f379fcfb0b3912d81f64f3652d2.tar.gz
samba-aac0c58e04ac5f379fcfb0b3912d81f64f3652d2.tar.bz2
samba-aac0c58e04ac5f379fcfb0b3912d81f64f3652d2.zip
libcli/echo: fix off by 1 crash bug
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Sat Dec 11 13:48:54 CET 2010 on sn-devel-104
Diffstat (limited to 'libcli/echo')
-rw-r--r--libcli/echo/echo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcli/echo/echo.c b/libcli/echo/echo.c
index 46d1e28b36..271f71b0ae 100644
--- a/libcli/echo/echo.c
+++ b/libcli/echo/echo.c
@@ -172,7 +172,7 @@ static void echo_request_done(struct tevent_req *subreq)
return;
}
- state->message[len] = '\0';
+ state->message[len-1] = '\0';
/* Once the async function has completed, set tevent_req_done() */
tevent_req_done(req);
}