lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 16 Jul 2008 18:31:42 +0200
From:	Goswin von Brederlow <goswin-v-b@....de>
To:	"Jose R. Santos" <jrs@...ibm.com>
Cc:	"Theodore Ts'o" <tytso@....edu>, linux-ext4@...r.kernel.org
Subject: Re: [PATCH 15/15][e2fsprogs] 64-bit mke2fs cleanup

"Jose R. Santos" <jrs@...ibm.com> writes:

> diff --git a/lib/ext2fs/initialize.c b/lib/ext2fs/initialize.c
> index e9bfe49..5060fda 100644
> --- a/lib/ext2fs/initialize.c
> +++ b/lib/ext2fs/initialize.c
> @@ -200,9 +200,9 @@ errcode_t ext2fs_initialize(const char *name, int flags,
>  		super->s_blocks_per_group = EXT2_MAX_BLOCKS_PER_GROUP(super);
>  	super->s_frags_per_group = super->s_blocks_per_group * frags_per_block;
>  	
> -	super->s_blocks_count = param->s_blocks_count;
> -	super->s_r_blocks_count = param->s_r_blocks_count;
> -	if (super->s_r_blocks_count >= param->s_blocks_count) {
> +	ext2fs_blocks_count_set(super, param->s_blocks_count);
> +	ext2fs_r_blocks_count_set(super, param->s_r_blocks_count);
> +	if (ext2fs_r_blocks_count(super) >= ext2fs_blocks_count(param)) {
>  		retval = EXT2_ET_INVALID_ARGUMENT;
>  		goto cleanup;
>  	}

This needs to preserve the high bits from param:

+	ext2fs_blocks_count_set(super, ext2fs_blocks_count(param));
+	ext2fs_r_blocks_count_set(super, ext2fs_r_blocks_count(param->s_r_blocks_count));

MfG
        Goswin
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists