mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-17 17:05:50 +00:00
Fix off-by-one in port number validation
This commit is contained in:
parent
46887c0447
commit
0cd3fcf1be
@ -547,7 +547,7 @@ static bool parseServerPortFromTransport(PRTSP_MESSAGE response, uint16_t* port)
|
||||
|
||||
// Validate the port number
|
||||
long int rawPort = strtol(portStart, NULL, 10);
|
||||
if (rawPort <= 0 || rawPort >= 65535) {
|
||||
if (rawPort <= 0 || rawPort > 65535) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user