diff --git a/lib/lwres/getrrset.c b/lib/lwres/getrrset.c index a29c9034e4..4551c78455 100644 --- a/lib/lwres/getrrset.c +++ b/lib/lwres/getrrset.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: getrrset.c,v 1.3 2000/11/28 01:50:46 gson Exp $ */ +/* $Id: getrrset.c,v 1.4 2000/12/13 00:22:54 bwelling Exp $ */ #include @@ -87,6 +87,14 @@ lwres_getrrsetbyname(const char *hostname, unsigned int rdclass, goto fail; } + /* + * Don't allow queries of class or type ANY + */ + if (rdclass == 0xff || rdtype == 0xff) { + result = ERRSET_INVAL; + goto fail; + } + lwresult = lwres_context_create(&lwrctx, NULL, NULL, NULL, 0); if (lwresult != LWRES_R_SUCCESS) { result = lwresult_to_result(lwresult);