{
int group = ext2fs_group_of_ino(fs, ino);
+#ifndef OMIT_COM_ERR
+ if (ino > fs->super->s_inodes_count) {
+ com_err("ext2fs_inode_alloc_stats2", 0,
+ "Illegal inode number: %lu", ino);
+ return;
+ }
+#endif
if (inuse > 0)
ext2fs_mark_inode_bitmap(fs->inode_map, ino);
else
{
int group = ext2fs_group_of_blk(fs, blk);
+#ifndef OMIT_COM_ERR
+ if (blk >= fs->super->s_blocks_count) {
+ com_err("ext2fs_block_alloc_stats2", 0,
+ "Illegal block number: %lu", blk);
+ return;
+ }
+#endif
if (inuse > 0)
ext2fs_mark_block_bitmap(fs->block_map, blk);
else