From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: [PATCH] Fix buffer overflow in xenconsoled Date: Tue, 30 Aug 2005 16:57:16 -0500 Message-ID: <4314D63C.7020700@us.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030100000609090003000502" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------030100000609090003000502 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Appears to be a typo. Christian's watch changes threw me off a bit as I had been pursuing another route to fix the same problems. This bug is still valid though. Regards, Anthony Liguori Signed-off-by: Anthony Liguori --------------030100000609090003000502 Content-Type: text/x-patch; name="6483_consoled.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="6483_consoled.diff" # HG changeset patch # User Anthony Liguori # Node ID 444e4fa43bf1123873cddecff51d9fe593271eae # Parent fe6c5ecea53aabedc6b53988da25910e108eafe9 Fix overflow in reading from console diff -r fe6c5ecea53a -r 444e4fa43bf1 tools/console/daemon/io.c --- a/tools/console/daemon/io.c Tue Aug 30 22:01:01 2005 +++ b/tools/console/daemon/io.c Tue Aug 30 22:05:28 2005 @@ -353,7 +353,7 @@ (struct ring_head *)(dom->page + PAGE_SIZE/2); int i; - len = read(dom->tty_fd, msg, MAX(XENCONS_SPACE(inring), sizeof(msg))); + len = read(dom->tty_fd, msg, MIN(XENCONS_SPACE(inring), sizeof(msg))); if (len < 1) { close(dom->tty_fd); dom->tty_fd = -1; --------------030100000609090003000502 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------030100000609090003000502--