From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5137 invoked by alias); 20 Dec 2009 19:11:24 -0000 Received: (qmail 5126 invoked by uid 22791); 20 Dec 2009 19:11:23 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 20 Dec 2009 19:11:18 +0000 Received: from mailhost3.vmware.com (mailhost3.vmware.com [10.16.27.45]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 1623A2B07A for ; Sun, 20 Dec 2009 11:11:17 -0800 (PST) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by mailhost3.vmware.com (Postfix) with ESMTP id 0B363CD907 for ; Sun, 20 Dec 2009 11:11:17 -0800 (PST) Message-ID: <4B2E762E.7060302@vmware.com> Date: Sun, 20 Dec 2009 19:11:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20090624) MIME-Version: 1.0 To: "gdb-patches@sourceware.org" Subject: [ob] fix buf size in amd64_epilogue_frame_cache Content-Type: multipart/mixed; boundary="------------050003010200040803000502" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-12/txt/msg00286.txt.bz2 This is a multi-part message in MIME format. --------------050003010200040803000502 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 116 Going to treat this one as obvious. Wrong buf size can cause overflow and crash under inauspicious circumstances. --------------050003010200040803000502 Content-Type: text/plain; name="buf.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="buf.txt" Content-length: 695 2009-12-20 Michael Snyder * amd64-tdep.c (amd64_epilogue_frame_cache): Fix buf size. Index: amd64-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/amd64-tdep.c,v retrieving revision 1.66 diff -u -p -r1.66 amd64-tdep.c --- amd64-tdep.c 5 Nov 2009 21:17:00 -0000 1.66 +++ amd64-tdep.c 20 Dec 2009 19:08:58 -0000 @@ -1928,7 +1928,7 @@ amd64_epilogue_frame_cache (struct frame struct gdbarch *gdbarch = get_frame_arch (this_frame); enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); struct amd64_frame_cache *cache; - gdb_byte buf[4]; + gdb_byte buf[8]; if (*this_cache) return *this_cache; --------------050003010200040803000502--