mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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:
1 parent
64b1c5e5be
commit
02143f7644
1 file changed
+1
-1
@@ -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
|
||||
|
||||