diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2018-10-13 17:18:05 +0300 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2018-10-13 17:18:05 +0300 |
commit | 8e740c677345540985eba92462f44e4b272a7652 (patch) | |
tree | 018524a5c04c4772238ddb3bcb8f244a5efa804e /asm/labels.c | |
parent | e996d28c70d45008085322b442b44a9224308548 (diff) | |
download | nasm-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>
Diffstat (limited to 'asm/labels.c')
-rw-r--r-- | asm/labels.c | 2 |
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); |