diff options
Diffstat (limited to 'src/analysis')
-rw-r--r-- | src/analysis/binary.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/analysis/binary.c b/src/analysis/binary.c index 58979d0..2b392bd 100644 --- a/src/analysis/binary.c +++ b/src/analysis/binary.c @@ -705,13 +705,19 @@ GOpenidaBinary *g_openida_binary_new_from_file(const char *filename) result = g_object_new(G_TYPE_OPENIDA_BINARY, NULL); + log_variadic_message(LMT_PROCESS, _("Opening '%s' file..."), filename); + result->filename = strdup(filename); result->bin_data = map_binary_file(filename, &result->bin_length); if (result->bin_data == NULL) goto lbf_error; result->format = G_EXE_FORMAT(load_new_format(FMT_EXEC, result->bin_data, result->bin_length)); - if (result->format == NULL) goto lbf_error; + if (result->format == NULL) + { + log_simple_message(LMT_INFO, _("Unknown binary format")); + goto lbf_error; + } switch (g_exe_format_get_target_machine(result->format)) { @@ -795,6 +801,8 @@ GOpenidaBinary *g_openida_binary_new_from_xml(xmlXPathContextPtr context, const free(filename); } + if (result == NULL) return NULL; + /* Parties à désassembler : default */ access = strdup(path); |