+2006-04-26 Dick Porter <dick@ximian.com>
+
+ * sockets.c (WSAIoctl): Check the output buffer is valid before
+ writing to it.
+
+ * handles.c (_wapi_search_handle): Set shared pointer if we find a
+ shared handle that has been already opened.
+
2006-04-21 Dick Porter <dick@ximian.com>
* threads.c (GetCurrentThread): Reference the handle if we return
if (check (ret, user_data) == TRUE) {
_wapi_handle_ref (ret);
found = TRUE;
+
+ if (_WAPI_SHARED_HANDLE (type)) {
+ shared = &_wapi_shared_layout->handles[i];
+ }
+
break;
}
}
} else {
/* We just copy the buffer to the output. Some ioctls
* don't even output any data, but, well...
+ *
+ * NB windows returns WSAEFAULT if o_len is too small
*/
i_len = (i_len > o_len) ? o_len : i_len;
- memcpy (output, buffer, i_len);
+
+ if (i_len > 0 && output != NULL) {
+ memcpy (output, buffer, i_len);
+ }
+
g_free (buffer);
*written = i_len;
}
+2006-04-26 Dick Porter <dick@ximian.com>
+
+ * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
+ dereference.
+
2006-04-25 Martin Baulig <martin@ximian.com>
* mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
mono_array_setref (*h_aliases, i, alias);
i++;
}
- } else if (family_hint == PF_UNSPEC || family_hint == PF_INET6) {
+ } else if (he2 != NULL && (family_hint == PF_UNSPEC ||
+ family_hint == PF_INET6)) {
*h_name=mono_string_new (domain, he2->h_name);
i=0;
mono_array_setref (*h_aliases, i, alias);
i++;
}
+ } else {
+ return(FALSE);
}
/*