enforce DS hash exists

(cherry picked from commit b274f3fad7)
This commit is contained in:
Mark Andrews 2019-02-27 10:32:18 +11:00
parent 13c87fdf99
commit 8df14d2f89

View file

@ -174,7 +174,7 @@ generic_fromwire_ds(ARGS_FROMWIRE) {
/*
* Check digest lengths if we know them.
*/
if (sr.length < 4 ||
if (sr.length < 5 ||
(sr.base[3] == DNS_DSDIGEST_SHA1 &&
sr.length < 4 + ISC_SHA1_DIGESTLENGTH) ||
(sr.base[3] == DNS_DSDIGEST_SHA256 &&