summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/imsg.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2005-03-09 14:08:04 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2005-03-09 14:08:04 +0000
commitf86a4642f2f6bb8372015afb074197c94cd1b677 (patch)
treea5c4111f4460db40814560b5960db9e918c22c79 /usr.sbin/bgpd/imsg.c
parenteb28d5d96266fd4e93ad4813e0b80a31833a4e64 (diff)
correctness: memmove instead of memcpy where we might have overlaps
Diffstat (limited to 'usr.sbin/bgpd/imsg.c')
-rw-r--r--usr.sbin/bgpd/imsg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/imsg.c b/usr.sbin/bgpd/imsg.c
index 539d3cae2c4..96029353830 100644
--- a/usr.sbin/bgpd/imsg.c
+++ b/usr.sbin/bgpd/imsg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: imsg.c,v 1.33 2004/09/17 11:49:19 claudio Exp $ */
+/* $OpenBSD: imsg.c,v 1.34 2005/03/09 14:08:03 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -113,7 +113,7 @@ imsg_get(struct imsgbuf *ibuf, struct imsg *imsg)
if (imsg->hdr.len < av) {
left = av - imsg->hdr.len;
- memcpy(&ibuf->r.buf, ibuf->r.buf + imsg->hdr.len, left);
+ memmove(&ibuf->r.buf, ibuf->r.buf + imsg->hdr.len, left);
ibuf->r.wpos = left;
} else
ibuf->r.wpos = 0;