diff --git a/modules/lookup_yp.c b/modules/lookup_yp.c index f5097dc..0fc84f8 100644 --- a/modules/lookup_yp.c +++ b/modules/lookup_yp.c @@ -168,6 +168,10 @@ int yp_all_master_callback(int status, char *ypkey, int ypkeylen, if (status != YP_TRUE) return status; + /* Ignore zero length keys */ + if (ypkeylen == 0) + return 0; + /* * Ignore keys beginning with '+' as plus map * inclusion is only valid in file maps. @@ -263,6 +267,10 @@ int yp_all_callback(int status, char *ypkey, int ypkeylen, if (status != YP_TRUE) return status; + /* Ignore zero length keys */ + if (ypkeylen == 0) + return 0; + /* * Ignore keys beginning with '+' as plus map * inclusion is only valid in file maps.