mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-25 08:39:28 +00:00
* grub-core/kern/emu/hostdisk.c (find_partition_start)
[HAVE_DIOCGDINFO]: Add safety checks.
This commit is contained in:
1 parent
a307c0b206
commit
9e4d19e0d3
2 files changed
+9
-1
No files matched your search
@@ -1,3 +1,8 @@
|
|||||||
|
2011-03-29 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/kern/emu/hostdisk.c (find_partition_start)
|
||||||
|
[HAVE_DIOCGDINFO]: Add safety checks.
|
||||||
|
|
||||||
2011-03-29 Vladimir Serbinenko <phcoder@gmail.com>
|
2011-03-29 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* util/grub.d/10_kfreebsd.in: Allow ufs.ko to be missing as it's
|
* util/grub.d/10_kfreebsd.in: Allow ufs.ko to be missing as it's
|
||||||
|
|||||||
@@ -518,9 +518,12 @@ devmapper_fail:
|
|||||||
# if !defined(HAVE_DIOCGDINFO)
|
# if !defined(HAVE_DIOCGDINFO)
|
||||||
return hdg.start;
|
return hdg.start;
|
||||||
# else /* defined(HAVE_DIOCGDINFO) */
|
# else /* defined(HAVE_DIOCGDINFO) */
|
||||||
|
if (dev[0])
|
||||||
p_index = dev[strlen(dev) - 1] - 'a';
|
p_index = dev[strlen(dev) - 1] - 'a';
|
||||||
|
else
|
||||||
|
p_index = -1;
|
||||||
|
|
||||||
if (p_index >= label.d_npartitions)
|
if (p_index >= label.d_npartitions || p_index < 0)
|
||||||
{
|
{
|
||||||
grub_error (GRUB_ERR_BAD_DEVICE,
|
grub_error (GRUB_ERR_BAD_DEVICE,
|
||||||
"no disk label entry for `%s'", dev);
|
"no disk label entry for `%s'", dev);
|
||||||
|
|||||||
Reference in new issue
Block a user