zfs boot: add a size check for a value in fzap_lookup

MFC after:	25 days
This commit is contained in:
Andriy Gapon 2012-09-11 07:15:11 +00:00
parent 4b7fc6b08e
commit 7ae0dc79b7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=240349

View file

@ -1355,6 +1355,8 @@ fzap_lookup(const spa_t *spa, const dnode_phys_t *dnode, const char *name, uint6
zc = &ZAP_LEAF_CHUNK(&zl, zc->l_entry.le_next);
}
if (fzap_name_equal(&zl, zc, name)) {
if (zc->l_entry.le_value_intlen * zc->l_entry.le_value_numints > 8)
return (E2BIG);
*value = fzap_leaf_value(&zl, zc);
return (0);
}