From: Russell Bryant Date: Mon, 8 Aug 2005 18:58:19 +0000 (+0000) Subject: Fix poll error condition causing memory corruption (bug #4915) X-Git-Tag: 1.0.11.1~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08630905fae73f5c1ae8711e6208683560d48c2c;p=thirdparty%2Fasterisk.git Fix poll error condition causing memory corruption (bug #4915) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@6311 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/manager.c b/manager.c index aac8c050e6..53e6008733 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);