]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
In gptboot, don't assume a partition number is a single digit, 1-9. GPT
authorIan Lepore <ian@FreeBSD.org>
Sun, 22 Dec 2019 22:33:22 +0000 (22:33 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Fri, 8 Oct 2021 01:15:58 +0000 (20:15 -0500)
commitdd80f75e664760479f55a2197448c014cfdd3025
tree19b79bf1ab304c4ed80c5e3d6fa2ece21718c2a6
parent01791287987664b5db4a362dc817f7081553aca2
In gptboot, don't assume a partition number is a single digit, 1-9.  GPT
partitions can have 128 partitions, so parse contiguous digits and then
validate that the number is between 1-128 inclusive.

I'm not sure 128 is a hard limit in the GPT standard, but it's the common
number in use, and it's a better upper limit than 9.

(cherry picked from commit 42e08952bb84aa86dfdcc7b80c95b58e515bdce7)
stand/i386/gptboot/gptboot.c