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]
Message-Id: <1433260130-1604-3-git-send-email-sergei@s15v.net>
Date:	Tue,  2 Jun 2015 18:48:49 +0300
From:	Sergei Zviagintsev <sergei@...v.net>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Daniel Mack <daniel@...que.org>,
	David Herrmann <dh.herrmann@...glemail.com>,
	Djalal Harouni <tixxdz@...ndz.org>
Cc:	linux-kernel@...r.kernel.org, Sergei Zviagintsev <sergei@...v.net>
Subject: [PATCH] kdbus: kdbus_item_validate(): remove duplicated code

KDBUS_ITEM_PAYLOAD_VEC and KDBUS_ITEM_PAYLOAD_OFF cases use literally
the same code, so merge them.

Signed-off-by: Sergei Zviagintsev <sergei@...v.net>
---
 ipc/kdbus/item.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/ipc/kdbus/item.c b/ipc/kdbus/item.c
index 745ad5495096..1ee72c2ad7c3 100644
--- a/ipc/kdbus/item.c
+++ b/ipc/kdbus/item.c
@@ -96,12 +96,6 @@ int kdbus_item_validate(const struct kdbus_item *item)
 		break;
 
 	case KDBUS_ITEM_PAYLOAD_VEC:
-		if (payload_size != sizeof(struct kdbus_vec))
-			return -EINVAL;
-		if (item->vec.size == 0 || item->vec.size > SIZE_MAX)
-			return -EINVAL;
-		break;
-
 	case KDBUS_ITEM_PAYLOAD_OFF:
 		if (payload_size != sizeof(struct kdbus_vec))
 			return -EINVAL;
-- 
1.8.3.1

--
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