mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-09-13 21:37:43 +02:00
For #909: Numeric truncation when parsing TYPEXX and CLASSXX representation
- Fix return values. - Formatting nits.
This commit is contained in:
@@ -226,12 +226,15 @@ make_query(char* qname, char* qtype, char* qclass)
|
||||
printf("cannot parse query name: '%s'\n", qname);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
qinfo.qtype = sldns_get_rr_type_by_name(qtype);
|
||||
if(qinfo.qtype == 0 && strcmp(qtype, "TYPE0") != 0) {
|
||||
printf("cannot parse query type: '%s'\n", qtype);
|
||||
exit(1);
|
||||
}
|
||||
qinfo.qclass = sldns_get_rr_class_by_name(qclass);
|
||||
if((qinfo.qtype == 0 && strcmp(qtype, "TYPE0") != 0) ||
|
||||
(qinfo.qclass == 0 && strcmp(qclass, "CLASS0") != 0)) {
|
||||
return 0;
|
||||
if(qinfo.qclass == 0 && strcmp(qclass, "CLASS0") != 0) {
|
||||
printf("cannot parse query class: '%s'\n", qclass);
|
||||
exit(1);
|
||||
}
|
||||
qinfo.local_alias = NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user