--- 2.2.18pre21/fs/ext2/file.c.~1~ Sun Nov 12 00:45:42 2000 +++ 2.2.18pre21/fs/ext2/file.c Sun Nov 19 03:59:29 2000 @@ -120,14 +120,14 @@ case 1: offset += file->f_pos; } - if (((unsigned long long) offset >> 32) != 0) { #if BITS_PER_LONG < 64 + if (offset >> 31) return -EINVAL; #else - if (offset > ext2_max_sizes[EXT2_BLOCK_SIZE_BITS(inode->i_sb)]) - return -EINVAL; + if (offset < 0 || + offset > ext2_max_sizes[EXT2_BLOCK_SIZE_BITS(inode->i_sb)]) + return -EINVAL; #endif - } if (offset != file->f_pos) { file->f_pos = offset; file->f_reada = 0;