]> git.ipfire.org Git - thirdparty/grub.git/commit
kern/partition: Limit recursion in part_iterate()
authorB Horn <b@horn.uk>
Sat, 16 Nov 2024 21:24:19 +0000 (21:24 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 23 Jan 2025 15:22:47 +0000 (16:22 +0100)
commit8a7103fddfd6664f41081f3bb88eebbf2871da2a
tree750f85dc4c9e6c7926b18e289379f5327f5d543a
parent18212f0648b6de7d71d4c8f41eb4d8b78b3a299b
kern/partition: Limit recursion in part_iterate()

The part_iterate() is used by grub_partition_iterate() as a callback in
the partition iterate functions. However, part_iterate() may also call
the partition iterate functions which may lead to recursion. Fix potential
issue by limiting the recursion depth.

Signed-off-by: B Horn <b@horn.uk>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/kern/partition.c