When you have an InetAddressType.InetAddress that's, say, 2.16.4294967200.4294967200.4294967200.4294967200.4294967200.4294967200.4294967200.4294967200.4294967200.4294967200.4294967200.4294967200.4294967200.4294967200.4294967200.4294967200, because the MIB implementation accidentally sign-extends bytes when it copies addresses, we overflow a stack-allocated buffer in mib.c and crash.
I added range checking to both IPv4 and IPv6. (A plain IPv4 address can not overflow the buffer, but an IPv4z can.) If we are outside the range, we fall back to "not handled".
Unfortunately, the "not handled" code then prints the buffer like an ASCII string, which is also wrong since there are values >255 in the oid string, but, one problem at a time. Ugly is better than crash. :-)
Log in to post a comment.