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

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