diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-10-02 00:07:43 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-10-02 00:07:43 +0000 |
commit | 3b99bad465bea18be54fb5615bf17a9e62d4f16d (patch) | |
tree | 7f76e81e9d95b22637b2b9ca01f1349d99b61564 /main/asterisk.c | |
parent | 7d2f53e55782a0a3086ef17f52a97a507d4351e7 (diff) |
Merged revisions 221777 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r221777 | tilghman | 2009-10-01 18:59:15 -0500 (Thu, 01 Oct 2009) | 9 lines
Merged revisions 221776 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r221776 | tilghman | 2009-10-01 18:53:12 -0500 (Thu, 01 Oct 2009) | 2 lines
Fix a bunch of off-by-one errors
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@221780 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/asterisk.c')
-rw-r--r-- | main/asterisk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/asterisk.c b/main/asterisk.c index a6f0e57f6..83b851ebb 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -1220,7 +1220,7 @@ static void *netconsole(void *vconsole) continue; } if (fds[0].revents) { - res = read_credentials(con->fd, tmp, sizeof(tmp), con); + res = read_credentials(con->fd, tmp, sizeof(tmp) - 1, con); if (res < 1) { break; } @@ -2420,7 +2420,7 @@ static char *cli_complete(EditLine *editline, int ch) if (ast_opt_remote) { snprintf(buf, sizeof(buf), "_COMMAND NUMMATCHES \"%s\" \"%s\"", lf->buffer, ptr); fdsend(ast_consock, buf); - res = read(ast_consock, buf, sizeof(buf)); + res = read(ast_consock, buf, sizeof(buf) - 1); buf[res] = '\0'; nummatches = atoi(buf); |