]> git.ipfire.org Git - thirdparty/grub.git/commit
kern/partition: Add sanity check after grub_strtoul() call
authorLidong Chen <lidong.chen@oracle.com>
Thu, 6 Feb 2025 18:16:56 +0000 (18:16 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 13 Feb 2025 14:45:58 +0000 (15:45 +0100)
commit8e6e87e7923ca2ae880021cb42a35cc9bb4c8fe2
treeebcd34205f67ee5c2972ec4e177979c3686cadb6
parent5b36a5210e21bee2624f8acc36aefd8f10266adb
kern/partition: Add sanity check after grub_strtoul() call

The current code incorrectly assumes that both the input and the values
returned by grub_strtoul() are always valid which can lead to potential
errors. This fix ensures proper validation to prevent any unintended issues.

Fixes: CID 473843
Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/kern/partition.c