From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21153 invoked by alias); 13 Jul 2003 22:09:59 -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 21145 invoked from network); 13 Jul 2003 22:09:55 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (62.163.169.212) by sources.redhat.com with SMTP; 13 Jul 2003 22:09:55 -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 h6DM9sGS000274 for ; Mon, 14 Jul 2003 00:09:54 +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 h6DM9sSZ000545 for ; Mon, 14 Jul 2003 00:09:54 +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 h6DM9sCx000542; Mon, 14 Jul 2003 00:09:54 +0200 (CEST) Date: Sun, 13 Jul 2003 22:09:00 -0000 Message-Id: <200307132209.h6DM9sCx000542@elgar.kettenis.dyndns.org> From: Mark Kettenis To: gdb-patches@sources.redhat.com Subject: Re: [PATCH] Fix possible buffer overflow bug in x86_64-tdep.c X-SW-Source: 2003-07/txt/msg00267.txt.bz2 I made a real mess of this. Wrong code, wrong ChangeLog, fix with empty log message. Fixed things now and checked it in on the branch. Here's what I checked in on the branch. This is effectively what I have checked in on mainline too. Mark Index: ChangeLog from Mark Kettenis * x86-64-tdep.c (x86_64_store_return_value): Use regcache_cooked_write_part instead of regcache_cooked_write. Index: x86-64-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/x86-64-tdep.c,v retrieving revision 1.79.2.2 diff -u -p -r1.79.2.2 x86-64-tdep.c --- x86-64-tdep.c 2 Jul 2003 07:46:40 -0000 1.79.2.2 +++ x86-64-tdep.c 13 Jul 2003 22:01:08 -0000 @@ -799,7 +799,8 @@ 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, valbuf); } /* XXX: What about complex floating point types? */ else