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-next>] [day] [month] [year] [list]
Date:   Thu, 27 Feb 2020 15:31:33 -0800
From:   Scott Branden <scott.branden@...adcom.com>
To:     Alexander Viro <viro@...iv.linux.org.uk>
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        bcm-kernel-feedback-list@...adcom.com,
        Scott Branden <scott.branden@...adcom.com>
Subject: [PATCH] exec: remove comparision of variable i_size of type loff_t against SIZE_MAX

Remove comparision of (i_size > SIZE_MAX).
i_size is of type loff_t and can not be great than SIZE_MAX (~(size_t)0).

Signed-off-by: Scott Branden <scott.branden@...adcom.com>
---
 fs/exec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/exec.c b/fs/exec.c
index db17be51b112..16c229752f74 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -919,7 +919,7 @@ int kernel_read_file(struct file *file, void **buf, loff_t *size,
 		ret = -EINVAL;
 		goto out;
 	}
-	if (i_size > SIZE_MAX || (max_size > 0 && i_size > max_size)) {
+	if (max_size > 0 && i_size > max_size) {
 		ret = -EFBIG;
 		goto out;
 	}
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ