mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-10-25 13:31:02 +00:00
Fix off-by-one in port number validation
This commit is contained in:
1 parent
46887c0447
commit
0cd3fcf1be
1 file changed
+1
-1
@@ -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