domainname isn't RFC1035 compliant. Also ensure that the length <=
YPMAXDOMAIN (which is less than what RFC1035 allows).
* use _yp_invalid_domain in the public front-ends, instead of using
hand-rolled checks
* fix a typo
(set them to the null pointer instead).
Thus, code that doesn't specificallly attempt to clean up allocated
memory after an error result is returned from yp_...() won't have an
unexpected memory leak (i.e, most 3rd party code)
* Ensure that all 'char **outXXX' pointers aren't the null pointer before use.
* Set *outXXX=NULL before checking any other arguments.
* Document that *outXXX will always be NULL or a malloc(3)ed string
unless outXXX was NULL (in which case YPERR_BADARGS will be returned
and the caller shouldn't attempt to free(*outXXX) if *outXXX != NULL;
These changes should prevent most occurances of coredumps when a bad
argument was given to a yp client function and the caller attempts to
free an outvalue that isn't the null pointer. To be really safe, the
caller probably should set the *outvalue=NULL anyway (ref: PR [lib/3580])