Author: atsushi
Date: 2006-01-24 05:28:20 -0500 (Tue, 24 Jan 2006)
New Revision: 55978

Modified:
   trunk/mono/mono/metadata/ChangeLog
   trunk/mono/mono/metadata/marshal.c
   trunk/mono/mono/metadata/object.c
Log:
2006-01-24  Atsushi Enomoto  <[EMAIL PROTECTED]>

        * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
          invalid surrogate in UTF7/UTF8 bytes and don't return NULL.



Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog  2006-01-24 10:11:16 UTC (rev 55977)
+++ trunk/mono/mono/metadata/ChangeLog  2006-01-24 10:28:20 UTC (rev 55978)
@@ -1,4 +1,8 @@
+2006-01-24  Atsushi Enomoto  <[EMAIL PROTECTED]>
 
+       * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
+         invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
+
 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <[EMAIL PROTECTED]>
 
        * object.c: fix deadlock related to string interning.

Modified: trunk/mono/mono/metadata/marshal.c
===================================================================
--- trunk/mono/mono/metadata/marshal.c  2006-01-24 10:11:16 UTC (rev 55977)
+++ trunk/mono/mono/metadata/marshal.c  2006-01-24 10:28:20 UTC (rev 55978)
@@ -485,9 +485,9 @@
 
        tmp = g_utf16_to_utf8 (mono_string_chars (s), s->length, NULL, &len, 
&error);
        if (error) {
-               g_warning (error->message);
+               MonoException *exc = mono_get_exception_argument ("string", 
error->message);
                g_error_free (error);
-               return NULL;
+               mono_raise_exception(exc);
        }
        else {
                as = CoTaskMemAlloc (len + 1);

Modified: trunk/mono/mono/metadata/object.c
===================================================================
--- trunk/mono/mono/metadata/object.c   2006-01-24 10:11:16 UTC (rev 55977)
+++ trunk/mono/mono/metadata/object.c   2006-01-24 10:28:20 UTC (rev 55978)
@@ -3234,8 +3234,9 @@
 
        as = g_utf16_to_utf8 (mono_string_chars (s), s->length, NULL, NULL, 
&error);
        if (error) {
-               g_warning (error->message);
+               MonoException *exc = mono_get_exception_argument ("string", 
error->message);
                g_error_free (error);
+               mono_raise_exception(exc);
        }
 
        return as;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to