mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-02-16 10:30:59 +00:00
Fix off-by-one in port number validation
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user