~daniel-mehrmann/e2fsprogs/master

« back to all changes in this revision

Viewing changes to lib/ext2fs/alloc.c

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2014-10-27 09:44:27 UTC
  • mfrom: (8.4.29 sid)
  • Revision ID: package-import@ubuntu.com-20141027094427-g56dce6sg7pasdgm
Tags: 1.42.12-1ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - debian/rules:
      Block pkg-create-dbgsym from operating on this package.
      Build without dietlibc-dev, which is in universe 
      Use the autotools-dev dh addon to update config.guess/config.sub for new
      ports.
  - debian/control:
      Regenerate with ./debian/rules debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
257
257
        b &= ~(c_ratio - 1);
258
258
        finish &= ~(c_ratio -1);
259
259
        do {
260
 
                if (b+num-1 > ext2fs_blocks_count(fs->super))
 
260
                if (b + num - 1 >= ext2fs_blocks_count(fs->super)) {
 
261
                        if (finish > start)
 
262
                                return EXT2_ET_BLOCK_ALLOC_FAIL;
261
263
                        b = fs->super->s_first_data_block;
 
264
                }
262
265
                if (ext2fs_fast_test_block_bitmap_range2(map, b, num)) {
263
266
                        *ret = b;
264
267
                        return 0;