Always fill in the buffer on a successful return from decode_rt_routing_info().

This commit is contained in:
Guy Harris 2014-12-18 22:19:10 -08:00
parent 5c65e7532f
commit 7bf77c03b8

View File

@ -716,8 +716,10 @@ decode_rt_routing_info(netdissect_options *ndo,
ND_TCHECK(pptr[0]);
plen = pptr[0]; /* get prefix length */
if (0 == plen)
return 1; /* default route target */
if (0 == plen) {
snprintf(buf, buflen, "default route target");
return 1;
}
if (32 > plen)
return -1;