[syslinux:elflink] com32/chain: fix potential problem with 'fs' option
syslinux-bot for Michal Soltys
soltys at ziu.info
Sat Feb 16 01:48:18 PST 2013
Commit-ID: 69c09a88f6c46ff139cd5c0316d3eeae508e2b5c
Gitweb: http://www.syslinux.org/commit/69c09a88f6c46ff139cd5c0316d3eeae508e2b5c
Author: Michal Soltys <soltys at ziu.info>
AuthorDate: Thu, 14 Feb 2013 16:51:47 +0100
Committer: Michal Soltys <soltys at ziu.info>
CommitDate: Thu, 14 Feb 2013 16:54:09 +0100
com32/chain: fix potential problem with 'fs' option
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.");
More information about the Syslinux-commits
mailing list