ChangeLog, resize2fs.c:
  resize2fs.c (blocks_to_move): Create the meta_bmap using the old
  	filesystem, not the new filesystem.
  (get_new_block): Don't try checking the old block bitmap if the block
  	we're testing is beyond the boundaries of the old filesystem.

diff --git a/resize/resize2fs.c b/resize/resize2fs.c
index 993f534..982e7d2 100644
--- a/resize/resize2fs.c
+++ b/resize/resize2fs.c
@@ -489,7 +489,7 @@
 	if (retval)
 		return retval;
 
-	retval = mark_table_blocks(fs, &meta_bmap);
+	retval = mark_table_blocks(old_fs, &meta_bmap);
 	if (retval)
 		return retval;
 
@@ -720,6 +720,7 @@
 		    ext2fs_test_block_bitmap(rfs->reserve_blocks,
 					     rfs->new_blk) ||
 		    ((rfs->alloc_state == AVOID_OLD) &&
+		     (rfs->new_blk < rfs->old_fs->super->s_blocks_count) &&
 		     ext2fs_test_block_bitmap(rfs->old_fs->block_map,
 					      rfs->new_blk))) {
 			rfs->new_blk++;