aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Soltys <soltys@ziu.info>2013-01-29 14:50:22 +0100
committerMichal Soltys <soltys@ziu.info>2013-01-29 14:50:22 +0100
commit2d2c5ad19ed5cfad7f4b36d45684a833ee721faf (patch)
tree9c3f0f2b0e714e95d6517480ee334f0d23b98a5c
parent90214a11d03058dc07135fcde94ed59bc1596ddc (diff)
downloadsyslinux-soltys_chain_upd_v3.tar.gz
syslinux-soltys_chain_upd_v3.tar.xz
syslinux-soltys_chain_upd_v3.zip
com32/chain: fix potential problem with 'fs' optionsoltys_chain_upd_v3
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@ziu.info>
-rw-r--r--com32/chain/chain.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/com32/chain/chain.c b/com32/chain/chain.c
index d59ab876..ae95d45c 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.");