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:   Sun, 15 Jul 2018 15:30:43 +0100
From:   Al Viro <viro@...IV.linux.org.uk>
To:     OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Anatoly Trosinenko <anatoly.trosinenko@...il.com>,
        linux-kernel@...r.kernel.org
Subject: Re: FAT: Operating on broken FAT FS causes the write syscall to
 return negative number not equal to -1

On Sun, Jul 15, 2018 at 11:20:06PM +0900, OGAWA Hirofumi wrote:
> +static inline bool fat_valid_entry(struct msdos_sb_info *sbi, int entry)
> +{
> +	if (entry < FAT_START_ENT || sbi->max_cluster <= entry)
> +		return false;
> +	return true;
> +}

Pet peeve: if (...) return false; return true; instead of return !....;

In this case,
	return entry >= FAT_START_ENT && entry < sb->max_cluster;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ