summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2018-10-13 17:18:05 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2018-10-13 17:18:05 +0300
commit8e740c677345540985eba92462f44e4b272a7652 (patch)
tree018524a5c04c4772238ddb3bcb8f244a5efa804e
parente996d28c70d45008085322b442b44a9224308548 (diff)
downloadnasm-8e740c677345540985eba92462f44e4b272a7652.tar.gz
labels: Make sure nil label is never passed
We already catched a case where we've missed test for non nil label and in result got sigsegv, lets rather panic next time. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--asm/labels.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/asm/labels.c b/asm/labels.c
index aad473ec..c00d6e5b 100644
--- a/asm/labels.c
+++ b/asm/labels.c
@@ -219,6 +219,8 @@ static union label *find_label(const char *label, bool create, bool *created)
char *label_str = NULL;
struct hash_insert ip;
+ nasm_assert(label != NULL);
+
if (islocal(label))
label = label_str = nasm_strcat(prevlabel, label);