summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-03-08 21:39:57 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-03-08 21:39:57 (GMT)
commite4b34b17cdf73cdd847acbd3400bc85a8ab0452e (patch)
tree3466717dad269eba25565362d9ae98c2417f7114
parente7ba901892df20045ff3a541b4fa34e36bd05bfb (diff)
Fixed a bug when dealing with a symbol without label.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@484 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
-rw-r--r--ChangeLog5
-rw-r--r--src/dialogs/gotox.c11
2 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 46ccde4..c9fa354 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
15-03-08 Cyrille Bagard <nocbos@gmail.com>
+ * src/dialogs/gotox.c:
+ Fix a bug when dealing with a symbol without label.
+
+15-03-08 Cyrille Bagard <nocbos@gmail.com>
+
* src/analysis/disass/area.c:
* src/format/symbol.c:
* src/format/symbol.h:
diff --git a/src/dialogs/gotox.c b/src/dialogs/gotox.c
index 33664d7..01d18f8 100644
--- a/src/dialogs/gotox.c
+++ b/src/dialogs/gotox.c
@@ -335,7 +335,16 @@ static void add_new_location_to_list(GtkTreeStore *store, GLoadedBinary *binary,
{
label = g_binary_symbol_get_label(symbol);
- name = make_symbol_offset(label, diff);
+ /**
+ * Un symbole ne possède pas toujours d'étiquette.
+ * C'est le cas par exemple pour les valeurs chargées par
+ * les instructions ARM de type 'ldr'.
+ */
+ if (label == NULL)
+ name = strdup(_("<no symbol found>"));
+
+ else
+ name = make_symbol_offset(label, diff);
}
else