Validate port number specified in Port directive
This was asked in bug #90 comment #8.
This commit is contained in:
parent
8b76f1a939
commit
95a6f8259c
10
src/conf.c
10
src/conf.c
@ -779,7 +779,15 @@ static HANDLE_FUNC (handle_bindsame)
|
|||||||
|
|
||||||
static HANDLE_FUNC (handle_port)
|
static HANDLE_FUNC (handle_port)
|
||||||
{
|
{
|
||||||
return set_int_arg (&conf->port, line, &match[2]);
|
set_int_arg (&conf->port, line, &match[2]);
|
||||||
|
|
||||||
|
if (conf->port > 65535) {
|
||||||
|
fprintf (stderr, "Bad port number (%d) supplied for Port.\n",
|
||||||
|
conf->port);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HANDLE_FUNC (handle_maxclients)
|
static HANDLE_FUNC (handle_maxclients)
|
||||||
|
Loading…
Reference in New Issue
Block a user