We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a635e3 commit 2b58decCopy full SHA for 2b58dec
1 file changed
components/drivers/block/partitions/efi.c
@@ -411,6 +411,11 @@ static rt_bool_t is_gpt_valid(struct rt_blk_disk *disk,
411
pt_size = (rt_uint64_t)rt_le32_to_cpu((*gpt)->num_partition_entries) *
412
rt_le32_to_cpu((*gpt)->sizeof_partition_entry);
413
414
+ if (pt_size > (rt_uint64_t)RT_UINT32_MAX)
415
+ {
416
+ goto _fail;
417
+ }
418
+
419
if (!(*ptes = alloc_read_gpt_entries(disk, *gpt)))
420
{
421
goto _fail;
0 commit comments