kern: Unbreak support for nested partitions
PATCH 1/1 kern: Unbreak support for nested partitions
When using syntax hd0,gtp3,dfly1 then ptr points to trailing part ",dfly1" so it's improper to consider it invalid partition
Signed-off-by Vladimir Serbinenko <[email protected]>
--- grub-core/kern/partition.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
grub-core/kern/partition.c +1 -1
@@ -134,7 +134,7 @@ grub_partition_probe (struct grub_disk *disk, const char *str) partname_end = ptr; num =grub_strtoul (ptr, &ptr,0 ); -if (*ptr !='\0' || num ==0 || num >GRUB_INT_MAX ) +if (num ==0 || num >GRUB_INT_MAX ) {grub_error (GRUB_ERR_BAD_NUMBER ,N_ ("invalid partition number" ));return 0 ;
Signature · 7 lines
2.48.1 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 4 lines · Vladimir Serbinenko
When using syntax hd0,gtp3,dfly1 then ptr points to trailing part ",dfly1" so it's improper to consider it invalid partition
Signed-off-by Vladimir Serbinenko <[email protected]>
Reviewed-by Daniel Kiper <[email protected]>
Daniel
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel