diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-10-02 00:03:52 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-10-02 00:03:52 +0000 |
commit | fc37758f12d5bf290d334cd611be1d23cc8dc06e (patch) | |
tree | f52977cbbd77b873fbf468836acd179311e4bd1b /main/asterisk.c | |
parent | 42d527ddcafc1c438ff88492f2b4e38d83138e94 (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.0@221778 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 2e3fb7260..74a19bb75 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -1018,7 +1018,7 @@ static void *netconsole(void *vconsole) continue; } if (fds[0].revents) { - res = read(con->fd, tmp, sizeof(tmp)); + res = read(con->fd, tmp, sizeof(tmp) - 1); if (res < 1) { break; } @@ -2271,7 +2271,7 @@ static char *cli_complete(EditLine *el, 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); |