fsck.minix: fix "array subscript is above array bounds"

fsck.minix.c: In function ‘map_block2’:
fsck.minix.c:486:9: warning: array subscript is above array bounds [-Warray-bounds]

The 'blknr' has to be bigger than 7 + 256 + (256 * 256) for i_zone[9].

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2011-07-21 13:00:40 +02:00
parent 0dca7bd54a
commit 06c0375ce3
1 changed files with 1 additions and 1 deletions

View File

@ -459,7 +459,7 @@ map_block2 (struct minix2_inode *inode, unsigned int blknr) {
return result;
}
blknr -= 256;
if (blknr >= 256 * 256) {
if (blknr < 256 * 256) {
block = check_zone_nr2 (inode->i_zone + 8, &changed);
read_block (block, (char *) dind);
blk_chg = 0;