61 lines
2.0 KiB
Diff
61 lines
2.0 KiB
Diff
--- ypserv-2.19/rpc.yppasswdd/yppasswdd.c.orig 2006-01-10 14:22:20.000000000 -0500
|
|
+++ ypserv-2.19/rpc.yppasswdd/yppasswdd.c 2006-09-13 09:26:02.000000000 -0400
|
|
@@ -333,6 +333,12 @@
|
|
break;
|
|
case '\253':
|
|
my_port = atoi (optarg);
|
|
+ if (my_port <= 0 || my_port > 0xffff) {
|
|
+ /* Invalid port number */
|
|
+ fprintf (stdout, "Warning: rpc.yppasswdd: Invalid port %d (0x%x)\n",
|
|
+ my_port, my_port);
|
|
+ my_port = -1;
|
|
+ }
|
|
if (debug_flag)
|
|
log_msg ("Using port %d\n", my_port);
|
|
break;
|
|
--- ypserv-2.19/rpc.ypxfrd/ypxfrd.c.orig 2006-01-10 14:22:20.000000000 -0500
|
|
+++ ypserv-2.19/rpc.ypxfrd/ypxfrd.c 2006-09-13 09:26:09.000000000 -0400
|
|
@@ -199,6 +199,12 @@
|
|
break;
|
|
case 'p':
|
|
my_port = atoi(optarg);
|
|
+ if (my_port <= 0 || my_port > 0xffff) {
|
|
+ /* Invalid port number */
|
|
+ fprintf (stdout, "Warning: rpc.ypxfrd: Invalid port %d (0x%x)\n",
|
|
+ my_port, my_port);
|
|
+ my_port = -1;
|
|
+ }
|
|
if (debug_flag)
|
|
log_msg("Using port %d\n", my_port);
|
|
break;
|
|
--- ypserv-2.19/yppush/yppush.c.orig 2005-05-31 05:14:40.000000000 -0400
|
|
+++ ypserv-2.19/yppush/yppush.c 2006-09-13 09:26:17.000000000 -0400
|
|
@@ -649,6 +649,12 @@
|
|
log_msg ("yppush cannot run in parallel with a fixed port");
|
|
return 1;
|
|
}
|
|
+ if (my_port <= 0 || my_port > 0xffff) {
|
|
+ /* Invalid port number */
|
|
+ fprintf (stdout, "Warning: yppush: Invalid port %d (0x%x)\n",
|
|
+ my_port, my_port);
|
|
+ my_port = -1;
|
|
+ }
|
|
break;
|
|
default:
|
|
Usage (1);
|
|
--- ypserv-2.19/ypserv/ypserv.c.orig 2006-09-13 09:00:40.000000000 -0400
|
|
+++ ypserv-2.19/ypserv/ypserv.c 2006-09-13 09:26:32.000000000 -0400
|
|
@@ -492,6 +492,12 @@
|
|
break;
|
|
case 'p':
|
|
my_port = atoi (optarg);
|
|
+ if (my_port <= 0 || my_port > 0xffff) {
|
|
+ /* Invalid port number */
|
|
+ fprintf (stdout, "Warning: ypserv: Invalid port %d (0x%x)\n",
|
|
+ my_port, my_port);
|
|
+ my_port = -1;
|
|
+ }
|
|
if (debug_flag)
|
|
log_msg ("Using port %d\n", my_port);
|
|
break;
|