diff options
author | Eric Anholt <anholt@freebsd.org> | 2004-08-14 00:03:32 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2004-08-14 00:03:32 +0000 |
commit | 2376ec4ef8d280cf6fba44ba0163989eff739187 (patch) | |
tree | d6c368c034f552f197d9ec418ddd41dc194e44b9 /bsd | |
parent | 211c37e250af6f8645a247ef1cce4dee041f3fd1 (diff) |
Hopefully proper fix for corrupted driver name in memcontrol list.
Reported by: Jung-uk Kim <jkim@niksun.com>
Diffstat (limited to 'bsd')
-rw-r--r-- | bsd/drm_memory.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bsd/drm_memory.h b/bsd/drm_memory.h index c871274e..26adb085 100644 --- a/bsd/drm_memory.h +++ b/bsd/drm_memory.h @@ -138,7 +138,7 @@ DRM(mtrr_add)(unsigned long offset, size_t size, int flags) mrdesc.mr_len = size; mrdesc.mr_flags = flags; act = MEMRANGE_SET_UPDATE; - bcopy(DRIVER_NAME, &mrdesc.mr_owner, strlen(DRIVER_NAME)); + strlcpy(mrdesc.mr_owner, DRIVER_NAME, sizeof(mrdesc.mr_owner)); return mem_range_attr_set(&mrdesc, &act); } @@ -152,7 +152,7 @@ DRM(mtrr_del)(unsigned long offset, size_t size, int flags) mrdesc.mr_len = size; mrdesc.mr_flags = flags; act = MEMRANGE_SET_REMOVE; - bcopy(DRIVER_NAME, &mrdesc.mr_owner, strlen(DRIVER_NAME)); + strlcpy(mrdesc.mr_owner, DRIVER_NAME, sizeof(mrdesc.mr_owner)); return mem_range_attr_set(&mrdesc, &act); } #elif defined(__NetBSD__) |