diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-08-08 18:58:19 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-08-08 18:58:19 +0000 |
commit | dc837d9b4358fa1512181e68f7a9e62491fe5182 (patch) | |
tree | f51f58e309f5544e5575c79a14e23ae213c2c0c2 | |
parent | b369c62b2d5f86e6f96e11030343cc16e84afdb4 (diff) |
Fix poll error condition causing memory corruption (bug #4915)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/v1-0@6311 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | manager.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1216,6 +1216,7 @@ static int get_input(struct mansession *s, char *output) res = poll(fds, 1, -1); if (res < 0) { ast_log(LOG_WARNING, "Select returned error: %s\n", strerror(errno)); + return -1; } else if (res > 0) { ast_mutex_lock(&s->lock); res = read(s->fd, s->inbuf + s->inlen, sizeof(s->inbuf) - 1 - s->inlen); |