diff --git a/lib/smb/nb_name.c b/lib/smb/nb_name.c index 8323e3a..d693be5 100644 --- a/lib/smb/nb_name.c +++ b/lib/smb/nb_name.c @@ -182,7 +182,7 @@ nb_name_encode(struct nb_name *np, u_char *dst) cp += 2; } *cp = 0; - if (np->nn_scope == NULL) + if (np->nn_scope == NULL || *np->nn_scope == 0) return nb_encname_len(dst); plen = cp++; lblen = 0;