diff options
Diffstat (limited to 'resolv/res_mkquery.c')
-rw-r--r-- | resolv/res_mkquery.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/resolv/res_mkquery.c b/resolv/res_mkquery.c index 12f9730..d80b531 100644 --- a/resolv/res_mkquery.c +++ b/resolv/res_mkquery.c @@ -103,6 +103,10 @@ res_nmkquery(res_state statp, int n; u_char *dnptrs[20], **dpp, **lastdnptr; + if (class < 0 || class > 65535 + || type < 0 || type > 65535) + return -1; + #ifdef DEBUG if (statp->options & RES_DEBUG) printf(";; res_nmkquery(%s, %s, %s, %s)\n", |