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: https://origsvn.digium.com/svn/asterisk/trunk@221777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2009-10-01 23:59:15 +00:00
parent dd0c76a9d3
commit 8c7b3cf738
3 changed files with 18 additions and 18 deletions

View File

@@ -1218,7 +1218,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;
}
@@ -2418,7 +2418,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);