[syslinux] [PATCH 28/28] com32/chain: fix potential problem with 'fs' option
Michal Soltys
soltys at ziu.info
Tue Jan 29 06:06:15 PST 2013
It's possible, that fs_lba available through syslinux_derivative_info()
could be 0. So match the candidates including disk, instead of only
partitions.
Signed-off-by: Michal Soltys <soltys at ziu.info>
---
com32/chain/chain.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/com32/chain/chain.c b/com32/chain/chain.c
index d59ab87..ae95d45 100644
--- a/com32/chain/chain.c
+++ b/com32/chain/chain.c
@@ -346,10 +346,10 @@ int find_dp(struct part_iter **_iter)
/* 'fs' => we should lookup the syslinux partition number and use it */
if (!strcmp(opt.drivename, "fs")) {
- while (!pi_next(iter)) {
+ do {
if (iter->abs_lba == fs_lba)
break;
- }
+ } while (!pi_next(iter));
/* broken part structure or other problems */
if (iter->status) {
error("Can't find myself on the drive I booted from.");
--
1.7.10.4
More information about the Syslinux
mailing list