diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-03-19 13:05:13 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-03-19 13:05:13 +0000 |
commit | 01c227fba4f1cefd47caa0aec8c5f503f0e29dc6 (patch) | |
tree | d26696d4b94ba50f649ec960abfcfbb3533bcb44 /linux-user | |
parent | 0fa1bcb79081e3cf006e705145a07c7fb135e1b3 (diff) |
Fix allocation sizes in getpeername/getsockname, spotted by Kirill A. Shutemov.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2499 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/syscall.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 7e4b0594ed..85f275cb75 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -863,7 +863,7 @@ static long do_getpeername(int fd, target_ulong target_addr, target_ulong target_addrlen) { socklen_t addrlen = tget32(target_addrlen); - void *addr = alloca(target_addrlen); + void *addr = alloca(addrlen); long ret; ret = get_errno(getpeername(fd, addr, &addrlen)); @@ -878,7 +878,7 @@ static long do_getsockname(int fd, target_ulong target_addr, target_ulong target_addrlen) { socklen_t addrlen = tget32(target_addrlen); - void *addr = alloca(target_addrlen); + void *addr = alloca(addrlen); long ret; ret = get_errno(getsockname(fd, addr, &addrlen)); |