msuraev has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30443 )
Change subject: telnet_init_dynif: don't allow negative port ......................................................................
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(-)
Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved
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");
3 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one.