The socket option handler tries to ensure that the option length is no
larger than some reasonable maximum, and no smaller than sizeof(struct
dn_id). But the loaded option length is stored in an int, which is
converted to an unsigned integer for the comparison with a size_t, so
negative values are not caught and get passed to malloc().
Use a cast to enforce the intended comparison. Found by code
inspection.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation