From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsV60-0005wU-Va for qemu-devel@nongnu.org; Tue, 08 Jan 2013 04:03:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TsV5w-0004Di-8C for qemu-devel@nongnu.org; Tue, 08 Jan 2013 04:03:44 -0500 Received: from mail-bk0-f50.google.com ([209.85.214.50]:60094) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsV5w-0004Db-1l for qemu-devel@nongnu.org; Tue, 08 Jan 2013 04:03:40 -0500 Received: by mail-bk0-f50.google.com with SMTP id jf3so80924bkc.37 for ; Tue, 08 Jan 2013 01:03:38 -0800 (PST) Date: Tue, 8 Jan 2013 10:03:36 +0100 From: Stefan Hajnoczi Message-ID: <20130108090336.GA31977@stefanha-thinkpad.redhat.com> References: <1357591119-40326-1-git-send-email-nickolai@csail.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1357591119-40326-1-git-send-email-nickolai@csail.mit.edu> Subject: Re: [Qemu-devel] [PATCH] readline: avoid memcpy() of overlapping regions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nickolai Zeldovich Cc: qemu-devel@nongnu.org On Mon, Jan 07, 2013 at 03:38:39PM -0500, Nickolai Zeldovich wrote: > memcpy() for overlapping regions is undefined behavior; use memmove() > instead in readline_hist_add(). > > Signed-off-by: Nickolai Zeldovich > --- > readline.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) I made a slight modification: keep the tab characters since the surrounding code still uses them. Thanks, applied to the trivial patches tree: https://github.com/stefanha/qemu/commits/trivial-patches Stefan