~ubuntu-branches/ubuntu/lucid/util-linux/lucid-security

« back to all changes in this revision

Viewing changes to shlibs/blkid/src/probe.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2010-03-13 00:21:08 UTC
  • Revision ID: james.westby@ubuntu.com-20100313002108-4cwo51hmbre64g4g
Tags: 2.17-0ubuntu3
Fix infinite loop in blkid when superblocks_probe bails out right at the
start, as it may do on extended partitions (LP: #528073).

Show diffs side-by-side

added added

removed removed

Lines of Context:
711
711
                /* we go to the next chain only when the previous probing
712
712
                 * result was nothing (rc == 1) and when the current chain is
713
713
                 * disabled or we are at end of the current chain (chain->idx +
714
 
                 * 1 == sizeof chain)
 
714
                 * 1 == sizeof chain) or the current chain bailed out right at
 
715
                 * the start (chain->idx == -1)
715
716
                 */
716
717
                else if (rc == 1 && (chn->enabled == FALSE ||
717
 
                                     chn->idx + 1 == chn->driver->nidinfos)) {
 
718
                                     chn->idx + 1 == chn->driver->nidinfos ||
 
719
                                     chn->idx == -1)) {
718
720
 
719
721
                        int idx = chn->driver->id + 1;
720
722