msuraev submitted this change.
telnet_init_dynif: don't allow negative port
Binding to a negative port should not be allowed.
Using signed value for unsigned parameter is a mistake to begin with.
Change-Id: I24f957641f2d8e230ccceb331a719496df0fdb1f
---
M src/vty/telnet_interface.c
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/vty/telnet_interface.c b/src/vty/telnet_interface.c
index 1758860..3fcae6e 100644
--- a/src/vty/telnet_interface.c
+++ b/src/vty/telnet_interface.c
@@ -80,6 +80,9 @@
{
int rc;
+ if (port < 0)
+ return -EINVAL;
+
tall_telnet_ctx = talloc_named_const(tall_ctx, 1,
"telnet_connection");
To view, visit change 30443. To unsubscribe, or for help writing mail filters, visit settings.