mirror of https://gerrit.osmocom.org/libosmocore
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
This commit is contained in:
parent
6d261343fa
commit
af35eb203c
|
@ -80,6 +80,9 @@ int telnet_init_dynif(void *tall_ctx, void *priv, const char *ip, int port)
|
|||
{
|
||||
int rc;
|
||||
|
||||
if (port < 0)
|
||||
return -EINVAL;
|
||||
|
||||
tall_telnet_ctx = talloc_named_const(tall_ctx, 1,
|
||||
"telnet_connection");
|
||||
|
||||
|
|
Loading…
Reference in New Issue