qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [BUG] [PATCH] Syscall gethostname fix
@ 2007-02-28 14:13 Kirill A. Shutemov
  2007-03-07 11:17 ` Kirill A. Shutemov
  0 siblings, 1 reply; 2+ messages in thread
From: Kirill A. Shutemov @ 2007-02-28 14:13 UTC (permalink / raw)
  To: qemu-devel


[-- Attachment #1.1: Type: text/plain, Size: 25 bytes --]

Patch in the attachment.

[-- Attachment #1.2: syscall_getsockname_fix.patch --]
[-- Type: text/plain, Size: 513 bytes --]

diff --git a/qemu/linux-user/syscall.c b/qemu/linux-user/syscall.c
index f3f97b0..ccb0e52 100644
--- a/qemu/linux-user/syscall.c
+++ b/qemu/linux-user/syscall.c
@@ -875,7 +875,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));

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [BUG] [PATCH] Syscall gethostname fix
  2007-02-28 14:13 [Qemu-devel] [BUG] [PATCH] Syscall gethostname fix Kirill A. Shutemov
@ 2007-03-07 11:17 ` Kirill A. Shutemov
  0 siblings, 0 replies; 2+ messages in thread
From: Kirill A. Shutemov @ 2007-03-07 11:17 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 867 bytes --]

On [Wed, 28.02.2007 17:13], Kirill A. Shutemov wrote:
> Patch in the attachment.
addrlen bytes should be allocated, not target_addrlen. It's typo I think.

> diff --git a/qemu/linux-user/syscall.c b/qemu/linux-user/syscall.c
> index f3f97b0..ccb0e52 100644
> --- a/qemu/linux-user/syscall.c
> +++ b/qemu/linux-user/syscall.c
> @@ -875,7 +875,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));




> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-07 11:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-28 14:13 [Qemu-devel] [BUG] [PATCH] Syscall gethostname fix Kirill A. Shutemov
2007-03-07 11:17 ` Kirill A. Shutemov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).