Fix off-by-one in port number validation
This commit is contained in:
parent
46887c0447
commit
0cd3fcf1be
1 changed files with 1 additions and 1 deletions
|
|
@ -547,7 +547,7 @@ static bool parseServerPortFromTransport(PRTSP_MESSAGE response, uint16_t* port)
|
||||||
|
|
||||||
// Validate the port number
|
// Validate the port number
|
||||||
long int rawPort = strtol(portStart, NULL, 10);
|
long int rawPort = strtol(portStart, NULL, 10);
|
||||||
if (rawPort <= 0 || rawPort >= 65535) {
|
if (rawPort <= 0 || rawPort > 65535) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue