diff options
author | wpaul <wpaul@FreeBSD.org> | 2005-11-23 17:10:46 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2005-11-23 17:10:46 +0000 |
commit | 3d571e2f28283e633fbc3eade19d120a71bb0e87 (patch) | |
tree | 44e812af2cf88aef4bc98b246ec6522d19739a4b /sys | |
parent | 869e65f8811fc7432cad2a6c894cd64dfedb1383 (diff) | |
download | FreeBSD-src-3d571e2f28283e633fbc3eade19d120a71bb0e87.zip FreeBSD-src-3d571e2f28283e633fbc3eade19d120a71bb0e87.tar.gz |
Somehow memmove() got mapped to memset() in the patch table. Create a
real memmove() implementation and use that instead.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/compat/ndis/subr_ntoskrnl.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/compat/ndis/subr_ntoskrnl.c b/sys/compat/ndis/subr_ntoskrnl.c index 19b97a1..772bf7a 100644 --- a/sys/compat/ndis/subr_ntoskrnl.c +++ b/sys/compat/ndis/subr_ntoskrnl.c @@ -234,6 +234,7 @@ static uint32_t WmiQueryTraceInformation(uint32_t, void *, uint32_t, static uint32_t WmiTraceMessage(uint64_t, uint32_t, void *, uint16_t, ...); static uint32_t IoWMIRegistrationControl(device_object *, uint32_t); static void *ntoskrnl_memset(void *, int, size_t); +static void *ntoskrnl_memmove(void *, void *, size_t); static char *ntoskrnl_strstr(char *, char *); static int ntoskrnl_toupper(int); static int ntoskrnl_tolower(int); @@ -423,6 +424,16 @@ ntoskrnl_memset(buf, ch, size) return(memset(buf, ch, size)); } +static void * +ntoskrnl_memmove(dst, src, size) + void *src; + void *dst; + size_t size; +{ + bcopy(src, dst, size); + return(dst); +} + static char * ntoskrnl_strstr(s, find) char *s, *find; @@ -4142,7 +4153,7 @@ image_patch_table ntoskrnl_functbl[] = { IMPORT_CFUNC_MAP(strstr, ntoskrnl_strstr, 0), IMPORT_CFUNC_MAP(strchr, index, 0), IMPORT_CFUNC(memcpy, 0), - IMPORT_CFUNC_MAP(memmove, ntoskrnl_memset, 0), + IMPORT_CFUNC_MAP(memmove, ntoskrnl_memmove, 0), IMPORT_CFUNC_MAP(memset, ntoskrnl_memset, 0), IMPORT_SFUNC(IoAllocateDriverObjectExtension, 4), IMPORT_SFUNC(IoGetDriverObjectExtension, 2), |