diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/dex/class.c | 5 | ||||
-rw-r--r-- | plugins/dexbnf/type.c | 5 | ||||
-rw-r--r-- | plugins/itanium/abi.c | 2 | ||||
-rw-r--r-- | plugins/itanium/component.c | 4 |
4 files changed, 10 insertions, 6 deletions
diff --git a/plugins/dex/class.c b/plugins/dex/class.c index a674b98..d6af91b 100644 --- a/plugins/dex/class.c +++ b/plugins/dex/class.c @@ -25,6 +25,7 @@ #include <malloc.h> +#include <string.h> #include "dex-int.h" @@ -313,7 +314,7 @@ GDexClass *g_dex_class_new(GDexFormat *format, const class_def_item *def) routine = g_dex_method_get_routine(method); g_object_ref(G_OBJECT(ctype)); - g_binary_routine_set_namespace(routine, ctype, "."); + g_binary_routine_set_namespace(routine, ctype, strdup(".")); g_binary_format_add_symbol(base, G_BIN_SYMBOL(routine)); @@ -339,7 +340,7 @@ GDexClass *g_dex_class_new(GDexFormat *format, const class_def_item *def) routine = g_dex_method_get_routine(method); g_object_ref(G_OBJECT(ctype)); - g_binary_routine_set_namespace(routine, ctype, "."); + g_binary_routine_set_namespace(routine, ctype, strdup(".")); g_binary_format_add_symbol(base, G_BIN_SYMBOL(routine)); diff --git a/plugins/dexbnf/type.c b/plugins/dexbnf/type.c index a6ce838..5a0d82c 100644 --- a/plugins/dexbnf/type.c +++ b/plugins/dexbnf/type.c @@ -24,6 +24,9 @@ #include "type.h" +#include <string.h> + + #include <analysis/types/basic.h> #include <analysis/types/cse.h> #include <analysis/types/encaps.h> @@ -113,7 +116,7 @@ static GDataType *dtd_full_class_name(input_buffer *buffer) result = g_class_enum_type_new(CET_CLASS, name); - g_data_type_set_namespace(result, ns, "."); + g_data_type_set_namespace(result, ns, strdup(".")); } while (1); diff --git a/plugins/itanium/abi.c b/plugins/itanium/abi.c index fa661dc..8891446 100644 --- a/plugins/itanium/abi.c +++ b/plugins/itanium/abi.c @@ -3330,7 +3330,7 @@ static itanium_component *itd_substitution(GItaniumDemangling *context) else { type = g_class_enum_type_new(CET_CLASS, strdup(stdinfo->class)); - g_data_type_set_namespace(type, std, "::"); + g_data_type_set_namespace(type, std, strdup("::")); } result = itd_make_type(type); diff --git a/plugins/itanium/component.c b/plugins/itanium/component.c index e7315e8..8c29861 100644 --- a/plugins/itanium/component.c +++ b/plugins/itanium/component.c @@ -1325,7 +1325,7 @@ static void itd_prepend_namespace_to_type(GDataType *type, GDataType *ns) existing = g_data_type_get_namespace(type); if (existing == NULL) - g_data_type_set_namespace(type, ns, "::"); + g_data_type_set_namespace(type, ns, strdup("::")); else { @@ -1869,7 +1869,7 @@ GBinRoutine *itd_translate_component_to_routine(const itanium_component *comp) } - g_binary_routine_set_namespace(result, ns, "::"); + g_binary_routine_set_namespace(result, ns, strdup("::")); break; |