summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 641a67eae25..0905ca2ad55 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1194,7 +1194,7 @@ bool is_myname(const char *s)
for (n=0; my_netbios_names(n); n++) {
const char *nbt_name = my_netbios_names(n);
- if (strncasecmp_m(nbt_name, s, strlen(nbt_name)) == 0) {
+ if (strncasecmp_m(nbt_name, s, MAX_NETBIOSNAME_LEN-1) == 0) {
ret=True;
break;
}