summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2003-08-17 23:43:46 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2003-08-17 23:43:46 +0000
commit9a97bdbd9dd93aa37e31e91bf44ea0fb3abc3721 (patch)
treea0df8635b41d715961f700ee29f8d8c88915e829
parent5b77c4eac4de2ce658bf4a57c156b5d10086bf9f (diff)
fix ptr arythmetics in core_write(); from aaron@
-rw-r--r--usr.bin/pmdb/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/pmdb/core.c b/usr.bin/pmdb/core.c
index 21763b25147..7425fe748d4 100644
--- a/usr.bin/pmdb/core.c
+++ b/usr.bin/pmdb/core.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: core.c,v 1.5 2003/03/29 00:01:46 mickey Exp $ */
+/* $OpenBSD: core.c,v 1.6 2003/08/17 23:43:45 mickey Exp $ */
/*
* Copyright (c) 2002 Jean-Francois Brousseau <krapht@secureops.com>
* All rights reserved.
@@ -183,7 +183,7 @@ core_write(struct pstate *ps, off_t to, void *from, size_t size)
cs = ps->ps_core->segs[i];
if ((to > cs->c_addr) && (to < (cs->c_addr + cs->c_size))) {
written = size;
- fp = cs + sizeof(*cs) + (to - cs->c_addr);
+ fp = (void *)cs + sizeof(*cs) + (to - cs->c_addr);
memcpy(fp, from, written);
return (written);
}