From owner-svn-src-all@FreeBSD.ORG Mon Dec 29 22:55:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A4499C4; Mon, 29 Dec 2014 22:55:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 739D022DE; Mon, 29 Dec 2014 22:55:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBTMtt4a006452; Mon, 29 Dec 2014 22:55:55 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBTMtt6P006451; Mon, 29 Dec 2014 22:55:55 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201412292255.sBTMtt6P006451@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 29 Dec 2014 22:55:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r276385 - stable/9/contrib/binutils/gas X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2014 22:55:55 -0000 Author: pfg Date: Mon Dec 29 22:55:54 2014 New Revision: 276385 URL: https://svnweb.freebsd.org/changeset/base/276385 Log: MFC r276228: gas: use memmove instead of bogus memcpy. partial_where points into the buffer that begins with buffer_start so we need to use memmove() to handle the overlap. Fixes Sourceware-PR 11456. Obtained from: OpenBSD (CVS rev. 1.2) Modified: stable/9/contrib/binutils/gas/input-scrub.c Directory Properties: stable/9/contrib/binutils/ (props changed) Modified: stable/9/contrib/binutils/gas/input-scrub.c ============================================================================== --- stable/9/contrib/binutils/gas/input-scrub.c Mon Dec 29 22:54:28 2014 (r276384) +++ stable/9/contrib/binutils/gas/input-scrub.c Mon Dec 29 22:55:54 2014 (r276385) @@ -335,7 +335,7 @@ input_scrub_next_buffer (char **bufp) if (partial_size) { - memcpy (buffer_start + BEFORE_SIZE, partial_where, + memmove (buffer_start + BEFORE_SIZE, partial_where, (unsigned int) partial_size); memcpy (buffer_start + BEFORE_SIZE, save_source, AFTER_SIZE); }