3138b4e
--- quota-tools/rquota_svc.c.orig	2005-06-01 03:21:30.000000000 -0400
3138b4e
+++ quota-tools/rquota_svc.c	2006-11-01 15:11:29.161101000 -0500
3138b4e
@@ -140,7 +140,7 @@ static void parse_options(int argc, char
3138b4e
 				break;
3138b4e
 			case 'p': 
3138b4e
 				port = strtol(optarg, &endptr, 0);
3138b4e
-				if (*endptr || port <= 0) {
3138b4e
+				if (*endptr || port <= 0 || port > 0xffff) {
3138b4e
 					errstr(_("Illegal port number: %s\n"), optarg);
3138b4e
 					show_help();
3138b4e
 					exit(1);