Commit e31a3778 authored by Mark Andrews's avatar Mark Andrews
Browse files

silence coverity - reviewed by Evan over jabber

parent 6f6b7781
......@@ -240,7 +240,7 @@ isc_netaddr_prefixok(const isc_netaddr_t *na, unsigned int prefixlen) {
return (ISC_R_FAILURE);
nbytes++;
}
if (memcmp(p + nbytes, zeros, ipbytes - nbytes) != 0)
if (nbytes < ipbytes && memcmp(p + nbytes, zeros, ipbytes - nbytes) != 0)
return (ISC_R_FAILURE);
return (ISC_R_SUCCESS);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment