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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <871rm8b957.fsf@mail.parknet.co.jp>
Date:   Mon, 22 Jun 2020 02:50:44 +0900
From:   OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
To:     trix@...hat.com
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fat: add a check to fat_add_new_entries

trix@...hat.com writes:

>  		start_blknr = blknr = fat_clus_to_blknr(sbi, cluster[i]);
>  		last_blknr = start_blknr + sbi->sec_per_clus;
> +
> +		/* overflow */
> +		if (unlikely(last_blknr <= start_blknr)) {
> +			err = -ENOMEM;
> +			goto error_nomem;
> +		}
> +

The cluster is 28bits and sec_per_clus is 8bits, so this should never
overflow actually. Is there no way to tell it to clang?

Thanks.
-- 
OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ