]> git.ipfire.org Git - thirdparty/grub.git/commit
fs/zfs/zfs: Fix possible insecure use of chunk size in zap_leaf_array_get()
authorDarren Kenny <darren.kenny@oracle.com>
Tue, 26 Oct 2021 15:02:39 +0000 (15:02 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 2 Nov 2021 15:48:59 +0000 (16:48 +0100)
commitbb9ff31641b00a8abd79feb37a845a1d4066b9bb
tree3580c77b0663beba51335b2e37dd1d828ab8538e
parentb1fae9c1ba1f3ba4c9b4d39ad6eaedf9d77af7ed
fs/zfs/zfs: Fix possible insecure use of chunk size in zap_leaf_array_get()

In zap_leaf_array_get() the chunk size passed in is considered tainted
by Coverity, and is being used before it is tested for validity. To fix
this the assignment of "la" is moved until after the test of the value
of "chunk".

Fixes: CID 314014
Signed-off-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/fs/zfs/zfs.c