From 8bda3bbcf4ee6efd817eaefb844577102fdc7d47 Mon Sep 17 00:00:00 2001 From: Stuart Henderson Date: Thu, 4 Dec 2014 19:55:50 +0000 Subject: replace an overlapping memcpy with memmove, ok deraadt tedu --- usr.sbin/bgpd/session.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin/bgpd') diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index b84ada17a2c..f95a237c9f0 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.336 2014/10/25 03:23:49 lteo Exp $ */ +/* $OpenBSD: session.c,v 1.337 2014/12/04 19:55:49 sthen Exp $ */ /* * Copyright (c) 2003, 2004, 2005 Henning Brauer @@ -1890,7 +1890,7 @@ session_process_msg(struct peer *p) if (rpos < av) { left = av - rpos; - memcpy(&p->rbuf->buf, p->rbuf->buf + rpos, left); + memmove(&p->rbuf->buf, p->rbuf->buf + rpos, left); p->rbuf->wpos = left; } else p->rbuf->wpos = 0; -- cgit v1.2.3