mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix segfault in auth-zone read and reorder of RRSIGs.
git-svn-id: file:///svn/unbound/trunk@4853 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
0c04b5eaf5
commit
1958d9fbd5
3 changed files with 12 additions and 2 deletions
|
|
@ -1,3 +1,6 @@
|
||||||
|
15 August 2018: Wouter
|
||||||
|
- Fix segfault in auth-zone read and reorder of RRSIGs.
|
||||||
|
|
||||||
14 August 2018: Wouter
|
14 August 2018: Wouter
|
||||||
- Fix that printout of error for cycle targets is a verbosity 4
|
- Fix that printout of error for cycle targets is a verbosity 4
|
||||||
printout and does not wrongly print it is a memory error.
|
printout and does not wrongly print it is a memory error.
|
||||||
|
|
|
||||||
|
|
@ -1014,7 +1014,8 @@ rrset_moveover_rrsigs(struct auth_data* node, uint16_t rr_type,
|
||||||
}
|
}
|
||||||
/* copy base values */
|
/* copy base values */
|
||||||
memcpy(sigd, sigold, sizeof(struct packed_rrset_data));
|
memcpy(sigd, sigold, sizeof(struct packed_rrset_data));
|
||||||
sigd->rrsig_count -= sigs;
|
/* in sigd the RRSIGs are stored in the base of the RR, in count */
|
||||||
|
sigd->count -= sigs;
|
||||||
/* setup rr_len */
|
/* setup rr_len */
|
||||||
sigd->rr_len = (size_t*)((uint8_t*)sigd +
|
sigd->rr_len = (size_t*)((uint8_t*)sigd +
|
||||||
sizeof(struct packed_rrset_data));
|
sizeof(struct packed_rrset_data));
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,12 @@ static const char* zone_example_com =
|
||||||
"z9.example.com. 3600 IN A 10.0.0.10\n"
|
"z9.example.com. 3600 IN A 10.0.0.10\n"
|
||||||
"z9.example.com. 3600 IN RRSIG A 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk=\n"
|
"z9.example.com. 3600 IN RRSIG A 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk=\n"
|
||||||
"z9.example.com. 3600 IN RRSIG A 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk=\n"
|
"z9.example.com. 3600 IN RRSIG A 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk=\n"
|
||||||
|
/* different covered types, first RRSIGs then, RRs, then another RRSIG */
|
||||||
|
"z10.example.com. 3600 IN RRSIG AAAA 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk=\n"
|
||||||
|
"z10.example.com. 3600 IN RRSIG A 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk=\n"
|
||||||
|
"z10.example.com. 3600 IN A 10.0.0.10\n"
|
||||||
|
"z10.example.com. 3600 IN RRSIG CNAME 8 3 10200 20170612005010 20170515005010 42393 nlnetlabs.nl. NhEDrHkuIgHkjWhDRVsGOIJWZpSs+QdduilWFe5d+/ZhOheLJbaTYD5w6+ZZ3yPh1tNud+jlg+GyiOSVapLEO31swDCIarL1UfRjRSpxxDCHGag5Zu+S4hF+KURxO3cJk8jLBELMQyRuMRHoKrw/wsiLGVu1YpAyAPPMcjFBNbk=\n"
|
||||||
|
"z10.example.com. 3600 IN AAAA ::11\n"
|
||||||
#endif /* if0 for duplicates and reordering */
|
#endif /* if0 for duplicates and reordering */
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
@ -554,7 +560,7 @@ checkfile(char* f1, char *f2)
|
||||||
log_info("in files %s and %s:%d", f1, f2, line);
|
log_info("in files %s and %s:%d", f1, f2, line);
|
||||||
log_info("'%s'", buf1);
|
log_info("'%s'", buf1);
|
||||||
log_info("'%s'", buf2);
|
log_info("'%s'", buf2);
|
||||||
fatal_exit("files are not eqaul");
|
fatal_exit("files are not equal");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unit_assert(feof(i1) && feof(i2));
|
unit_assert(feof(i1) && feof(i2));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue