summaryrefslogtreecommitdiff
path: root/src/gui/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r--src/gui/dialogs/gotox.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/gui/dialogs/gotox.c b/src/gui/dialogs/gotox.c
index f28654d..72c2f8c 100644
--- a/src/gui/dialogs/gotox.c
+++ b/src/gui/dialogs/gotox.c
@@ -372,7 +372,7 @@ static void add_new_location_to_list(GtkTreeStore *store, GLoadedBinary *binary,
size_t index; /* Indice de ligne à traiter */
GBufferLine *line; /* Ligne présente à l'adresse */
char *virtual; /* Transcription d'adresse */
- const char *label; /* Etiquette de symbole trouvé */
+ char *label; /* Etiquette de symbole trouvé */
GBinFormat *format; /* Format associé au binaire */
GBinSymbol *symbol; /* Symbole associé à l'adresse */
phys_t diff; /* Décalage vis à vis du début */
@@ -410,7 +410,17 @@ static void add_new_location_to_list(GtkTreeStore *store, GLoadedBinary *binary,
label = g_binary_symbol_get_label(hint);
- name = make_symbol_offset(label, 0);
+ /**
+ * Cf. commentaire suivant.
+ */
+ if (label == NULL)
+ name = strdup(_("<no symbol found>"));
+
+ else
+ {
+ name = make_symbol_offset(label, 0);
+ free(label);
+ }
}
else
@@ -430,7 +440,10 @@ static void add_new_location_to_list(GtkTreeStore *store, GLoadedBinary *binary,
name = strdup(_("<no symbol found>"));
else
+ {
name = make_symbol_offset(label, diff);
+ free(label);
+ }
}
else