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>] [day] [month] [year] [list]
Date:	Thu, 3 Jan 2008 17:17:31 +0000
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	akpm@...l.org, linux-kernel@...r.kernel.org
Subject: [PATCH] ipc: Fix warning that has recently appeared

Use _t form to force types. We know that msg->m_ts is
clamped between 0 and MAXINT.

Signed-off-by: Alan Cox <alan@...hat.com>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.24-rc6-mm1/ipc/msg.c linux-2.6.24-rc6-mm1/ipc/msg.c
--- linux.vanilla-2.6.24-rc6-mm1/ipc/msg.c	2008-01-02 16:04:25.000000000 +0000
+++ linux-2.6.24-rc6-mm1/ipc/msg.c	2008-01-02 16:50:46.000000000 +0000
@@ -898,7 +898,7 @@
 	if (IS_ERR(msg))
 		return PTR_ERR(msg);
 
-	msgsz = min(msgsz, msg->m_ts);
+	msgsz = min_t(size_t, msgsz, msg->m_ts);
 	*pmtype = msg->m_type;
 	if (store_msg(mtext, msg, msgsz))
 		msgsz = -EFAULT;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ