This fixes a problem where is_myname() returns true if one of our names
is a substring of the specified name.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11427
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
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;
}