Blame SOURCES/quota-4.03-Validate-upper-bound-of-RPC-port.patch

97c04e
From c9a2a6fea0668579f5fb8d77cb219f51d104581f Mon Sep 17 00:00:00 2001
97c04e
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
97c04e
Date: Wed, 6 Jan 2016 17:58:22 +0100
97c04e
Subject: [PATCH] Validate upper bound of RPC port
97c04e
MIME-Version: 1.0
97c04e
Content-Type: text/plain; charset=UTF-8
97c04e
Content-Transfer-Encoding: 8bit
97c04e
97c04e
Signed-off-by: Petr Písař <ppisar@redhat.com>
97c04e
---
97c04e
 rquota_svc.c | 2 +-
97c04e
 1 file changed, 1 insertion(+), 1 deletion(-)
97c04e
97c04e
diff --git a/rquota_svc.c b/rquota_svc.c
97c04e
index 338b70f..93472e0 100644
97c04e
--- a/rquota_svc.c
97c04e
+++ b/rquota_svc.c
97c04e
@@ -142,7 +142,7 @@ static void parse_options(int argc, char **argv)
97c04e
 				break;
97c04e
 			case 'p': 
97c04e
 				port = strtol(optarg, &endptr, 0);
97c04e
-				if (*endptr || port <= 0) {
97c04e
+				if (*endptr || port <= 0 || port > 0xffff) {
97c04e
 					errstr(_("Illegal port number: %s\n"), optarg);
97c04e
 					show_help();
97c04e
 					exit(1);
97c04e
-- 
97c04e
2.5.0
97c04e