X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmetadata%2Fsecurity-core-clr.c;h=b93c72203221ac36fd6a656ca7a2d5fa4dff61a0;hb=62b96ad507e6ba07bde09991a30e5447255e44ba;hp=e3143cc564f100c57a79be6b7903fd167127eaaf;hpb=4ae209510f6d1f6cd86ea936fae1c748ce83caf2;p=mono.git diff --git a/mono/metadata/security-core-clr.c b/mono/metadata/security-core-clr.c index e3143cc564f..b93c7220322 100644 --- a/mono/metadata/security-core-clr.c +++ b/mono/metadata/security-core-clr.c @@ -160,13 +160,13 @@ set_type_load_exception_type (const char *format, MonoClass *klass) { char *type_name = mono_type_get_full_name (klass); char *parent_name = mono_type_get_full_name (klass->parent); - char *message = g_strdup_printf (format, type_name, parent_name); + char *message = mono_image_strdup_printf (klass->image, format, type_name, parent_name); g_free (parent_name); g_free (type_name); - mono_trace (G_LOG_LEVEL_WARNING, MONO_TRACE_SECURITY, message); - mono_class_set_failure (klass, MONO_EXCEPTION_TYPE_LOAD, message); + mono_trace (G_LOG_LEVEL_WARNING, MONO_TRACE_SECURITY, "%s", message); + mono_class_set_type_load_failure (klass, "%s", message); // note: do not free string given to mono_class_set_failure } @@ -183,13 +183,13 @@ set_type_load_exception_methods (const char *format, MonoMethod *override, MonoM { char *method_name = get_method_full_name (override); char *base_name = get_method_full_name (base); - char *message = g_strdup_printf (format, method_name, base_name); + char *message = mono_image_strdup_printf (override->klass->image, format, method_name, base_name); g_free (base_name); g_free (method_name); - mono_trace (G_LOG_LEVEL_WARNING, MONO_TRACE_SECURITY, message); - mono_class_set_failure (override->klass, MONO_EXCEPTION_TYPE_LOAD, message); + mono_trace (G_LOG_LEVEL_WARNING, MONO_TRACE_SECURITY, "%s", message); + mono_class_set_type_load_failure (override->klass, "%s", message); // note: do not free string given to mono_class_set_failure } @@ -561,7 +561,7 @@ get_argument_exception (const char *format, MonoMethod *caller, MonoMethod *call g_free (callee_name); g_free (caller_name); - mono_trace (G_LOG_LEVEL_WARNING, MONO_TRACE_SECURITY, message); + mono_trace (G_LOG_LEVEL_WARNING, MONO_TRACE_SECURITY, "%s", message); ex = mono_get_exception_argument ("method", message); g_free (message); @@ -586,7 +586,7 @@ get_field_access_exception (const char *format, MonoMethod *caller, MonoClassFie g_free (field_name); g_free (caller_name); - mono_trace (G_LOG_LEVEL_WARNING, MONO_TRACE_SECURITY, message); + mono_trace (G_LOG_LEVEL_WARNING, MONO_TRACE_SECURITY, "%s", message); ex = mono_get_exception_field_access_msg (message); g_free (message); @@ -611,7 +611,7 @@ get_method_access_exception (const char *format, MonoMethod *caller, MonoMethod g_free (callee_name); g_free (caller_name); - mono_trace (G_LOG_LEVEL_WARNING, MONO_TRACE_SECURITY, message); + mono_trace (G_LOG_LEVEL_WARNING, MONO_TRACE_SECURITY, "%s", message); ex = mono_get_exception_method_access_msg (message); g_free (message);