aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-08-08 18:58:19 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-08-08 18:58:19 +0000
commitdc837d9b4358fa1512181e68f7a9e62491fe5182 (patch)
treef51f58e309f5544e5575c79a14e23ae213c2c0c2
parentb369c62b2d5f86e6f96e11030343cc16e84afdb4 (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-xmanager.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/manager.c b/manager.c
index aac8c050e..53e600873 100755
--- a/manager.c
+++ b/manager.c
@@ -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);