8.2.2P5 Bugfix for Win2K long interface names
Michael Beyer
bindbug at darkstreak.com
Sat Oct 14 02:39:32 UTC 2000
Version babble:
BIND 8.2.2-P5 (also applies up to at least 8.2.3-T6B)
Windows2000 5.00.2195SP1 (may apply to other WinNT versions as well)
Bugfix:
Just a simple buffer overrun in src\port\winnt\libbind\snmpmib.c which can
prevent BIND from using some interfaces. In Windows2000 interface names may be
longer than IFNAMSIZ (=64). For example, my "Linksys LNE100TX Fast Ethernet
Adapter (LNE100TX v4) NDIS5 Driver" is 65 characters long. Limit the data
memcpy'ed into ifd->if_name to make sure that any extra characters won't
overrun into the family field:
/* Get the interface name */
len = 0;
/* Why do we do this?
* Because there are often nonprintable chars in this string for some reason.
* So we scan the string to get only the printable portion.
*/
--> while((len < ifInfoBind[IF_NAME].value.asnValue.string.length) && (len < (IFNAMSIZ-1)))
{
c = ifInfoBind[IF_NAME].value.asnValue.string.stream[len];
if(c < 0x20 || c > 0x7E)
break;
len++;
}
memcpy(ifd->if_name, ifInfoBind[IF_NAME].value.asnValue.string.stream, len);
-- Michael Beyer
Darkstreak Consulting
More information about the bind-users
mailing list