bitkeeper revision 1.1159.241.3 (4202bcfcMuCoA62roOJu-r3AKctkBQ)

strncpy will stop after a zero byte. Use memcpy instead.

Signed-off-by: Chengyuan Li <chengyuan.li@intel.com>
Signed-off-by: ian.pratt@cl.cam.ac.uk
This commit is contained in:
iap10@labyrinth.cl.cam.ac.uk committed 2005-02-04 00:08:28 +00:00
1 parent 64b1c5e5be
commit 02143f7644
1 file changed
+1 -1
+1 -1
View File
@@ -372,7 +372,7 @@ static int inst_copy_from_guest(char *buf, unsigned long guest_eip, int inst_len
ma = (mfn << PAGE_SHIFT) | (guest_eip & (PAGE_SIZE - 1));
inst_start = (unsigned char *)map_domain_mem(ma);
strncpy(buf, inst_start, inst_len);
memcpy(buf, inst_start, inst_len);
unmap_domain_mem(inst_start);
} else {
// Todo: In two page frames
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.