From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12685 invoked by alias); 13 Jul 2003 16:32:02 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 12560 invoked from network); 13 Jul 2003 16:31:50 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (62.163.169.212) by sources.redhat.com with SMTP; 13 Jul 2003 16:31:50 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6p2/8.12.5) with ESMTP id h6DGVkaM009991 for ; Sun, 13 Jul 2003 18:31:46 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6p2/8.12.6) with ESMTP id h6DGVkt3098453 for ; Sun, 13 Jul 2003 18:31:46 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6p2/8.12.6/Submit) id h6DGVkvI098450; Sun, 13 Jul 2003 18:31:46 +0200 (CEST) Date: Sun, 13 Jul 2003 16:32:00 -0000 Message-Id: <200307131631.h6DGVkvI098450@elgar.kettenis.dyndns.org> From: Mark Kettenis To: gdb-patches@sources.redhat.com Subject: [PATCH] Fix possible buffer overflow bug in x86_64-tdep.c X-SW-Source: 2003-07/txt/msg00262.txt.bz2 The attached fixes a possible buffer overflow in x86_64_store_return_value(). (Andreas, this was the bug I mentioned to you yesterday). Andreas forgot to check in his origional patch on the 6.0 release branch. I'll do so shortly with this fix included. Checked in. Mark Index: ChangeLog from Mark Kettenis * x86-64-tdep.c (x86_64_store_return_value): Use an intermediate buffer when storing double and float varibles into %xmm0. Index: x86-64-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/x86-64-tdep.c,v retrieving revision 1.82 diff -u -p -r1.82 x86-64-tdep.c --- x86-64-tdep.c 9 Jul 2003 22:10:58 -0000 1.82 +++ x86-64-tdep.c 13 Jul 2003 16:28:14 -0000 @@ -788,7 +788,7 @@ x86_64_store_return_value (struct type * else if (TYPE_CODE_FLT == TYPE_CODE (type)) { /* Handle double and float variables. */ - regcache_cooked_write (regcache, X86_64_XMM0_REGNUM, valbuf); + regcache_cooked_write_part (regcache, X86_64_XMM0_REGNUM, 0, len, buf); } /* XXX: What about complex floating point types? */ else