Revision 579a97f7 linux-user/linuxload.c

b/linux-user/linuxload.c
13 13
#define NGROUPS 32
14 14

  
15 15
/* ??? This should really be somewhere else.  */
16
void memcpy_to_target(abi_ulong dest, const void *src,
17
                      unsigned long len)
16
abi_long memcpy_to_target(abi_ulong dest, const void *src,
17
                          unsigned long len)
18 18
{
19 19
    void *host_ptr;
20 20

  
21
    host_ptr = lock_user(dest, len, 0);
21
    host_ptr = lock_user(VERIFY_WRITE, dest, len, 0);
22
    if (!host_ptr)
23
        return -TARGET_EFAULT;
22 24
    memcpy(host_ptr, src, len);
23 25
    unlock_user(host_ptr, dest, 1);
26
    return 0;
24 27
}
25 28

  
26 29
static int in_group_p(gid_t g)

Also available in: Unified diff