summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext2fs/getblk.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext2fs/getblk.c b/ext2fs/getblk.c
index 8dac694c..63443bce 100644
--- a/ext2fs/getblk.c
+++ b/ext2fs/getblk.c
@@ -122,6 +122,8 @@ inode_getblk (struct node *node, int nr, int create, int zero,
block_t hint;
#endif
+ assert (0 <= nr && nr < EXT2_N_BLOCKS);
+
*result = node->dn->info.i_data[nr];
if (*result)
return 0;