diff options
author | Dick Porter <dick@acm.org> | 2004-07-28 19:44:15 +0400 |
---|---|---|
committer | Dick Porter <dick@acm.org> | 2004-07-28 19:44:15 +0400 |
commit | ca744bd635a14a593be3a7d9bdbb006541b91d8a (patch) | |
tree | 46a92edc5e6b2162de0a788f1b0b9e7ec9a5a08d | |
parent | a13d1dd4ca5d1a6af481e1d221ce7450cd769771 (diff) |
2004-07-28 Dick Porter <dick@ximian.com>
* socket-io.c
(ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
returned sockaddr size before creating the remote address object.
Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
61608.
svn path=/branches/mono-1-0/mono/; revision=31561
-rw-r--r-- | mono/metadata/ChangeLog | 8 | ||||
-rw-r--r-- | mono/metadata/socket-io.c | 10 |
2 files changed, 17 insertions, 1 deletions
diff --git a/mono/metadata/ChangeLog b/mono/metadata/ChangeLog index 2c352a82cf0..48f6cd2c8c2 100644 --- a/mono/metadata/ChangeLog +++ b/mono/metadata/ChangeLog @@ -1,5 +1,13 @@ 2004-07-28 Dick Porter <dick@ximian.com> + * socket-io.c + (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check + returned sockaddr size before creating the remote address object. + Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug + 61608. + +2004-07-28 Dick Porter <dick@ximian.com> + * locales.c (string_invariant_compare_char): Fix invariant char compares between upper and lower cases. Fixes bug 61458. diff --git a/mono/metadata/socket-io.c b/mono/metadata/socket-io.c index 1bb44ea75b2..1ef49278ea9 100644 --- a/mono/metadata/socket-io.c +++ b/mono/metadata/socket-io.c @@ -1160,7 +1160,15 @@ gint32 ves_icall_System_Net_Sockets_Socket_RecvFrom_internal(SOCKET sock, MonoAr return(0); } - *sockaddr=create_object_from_sockaddr(sa, sa_size, error); + /* If we didn't get a socket size, then we're probably a + * connected connection-oriented socket and the stack hasn't + * returned the remote address. All we can do is return null. + */ + if ( sa_size != 0 ) + *sockaddr=create_object_from_sockaddr(sa, sa_size, error); + else + *sockaddr=NULL; + g_free(sa); return(ret); |