diff options
author | Michal Soltys <soltys@ziu.info> | 2013-02-14 16:51:46 +0100 |
---|---|---|
committer | Michal Soltys <soltys@ziu.info> | 2013-02-14 16:53:05 +0100 |
commit | 4e761f7bc40ff810ba1e57efbd66fe9a82044658 (patch) | |
tree | 0cf6067b245c2ff395b0b642a88df1df36ade9ba /com32 | |
parent | 5dd95bd511d8f45a588ba465cf9448bd2da1c1e3 (diff) | |
download | syslinux-4e761f7bc40ff810ba1e57efbd66fe9a82044658.tar.gz |
com32/chain: (partiter) dos_next_ebr() fixup
Make sure that *lba is set to 0, if start_lba in the record is 0. Not an
issue in any of the code using partiter currently, as that implies
either broken layout or a hole. Still useful for consistency with index
== -1 or when relax flag is set.
Signed-off-by: Michal Soltys <soltys@ziu.info>
Diffstat (limited to 'com32')
-rw-r--r-- | com32/chain/partiter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/com32/chain/partiter.c b/com32/chain/partiter.c index a4dc13d0..8d0c2722 100644 --- a/com32/chain/partiter.c +++ b/com32/chain/partiter.c @@ -374,7 +374,7 @@ static int dos_next_ebr(struct part_iter *iter, uint32_t *lba, iter->dos.logskipcnt++; if (dp[0].ostype || (iter->flags & PIF_STEPALL)) { - *lba = iter->dos.cebr_lba + dp[0].start_lba; + *lba = dp[0].start_lba ? iter->dos.cebr_lba + dp[0].start_lba : 0; *_dp = dp; return 0; } |