]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix poll error condition causing memory corruption (bug #4915)
authorRussell Bryant <russell@russellbryant.com>
Mon, 8 Aug 2005 18:58:19 +0000 (18:58 +0000)
committerRussell Bryant <russell@russellbryant.com>
Mon, 8 Aug 2005 18:58:19 +0000 (18:58 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@6311 65c4cc65-6c06-0410-ace0-fbb531ad65f3

manager.c

index aac8c050e696b68fe2c9bd3c13f9eabeb48c98ad..53e6008733e45963f52bf5c718a97bd3c63f7206 100755 (executable)
--- 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);