mirror of
https://github.com/freebsd/freebsd-src
synced 2024-11-02 19:51:25 +00:00
zfs boot: add a size check for a value in fzap_lookup
MFC after: 25 days
This commit is contained in:
parent
4b7fc6b08e
commit
7ae0dc79b7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=240349
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue