[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [pluggable-transports/snowflake] 02/03: proxy: Check ephemeral port range ordering at flag parsing



This is an automated email from the git hooks/post-receive script.

meskio pushed a commit to branch main
in repository pluggable-transports/snowflake.

commit 21d74498518a600f9ad2124cb4da23d721b7fb41
Author: KokaKiwi <kokakiwi+tor@xxxxxxxxxxxx>
AuthorDate: Fri Oct 14 21:40:07 2022 +0200

    proxy: Check ephemeral port range ordering at flag parsing
---
 proxy/main.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/proxy/main.go b/proxy/main.go
index 146a1f3..ea8f427 100644
--- a/proxy/main.go
+++ b/proxy/main.go
@@ -54,6 +54,9 @@ func main() {
 			if ephemeralMinPort == 0 || ephemeralMaxPort == 0 {
 				log.Fatal("Ephemeral port cannot be zero")
 			}
+			if ephemeralMinPort > ephemeralMaxPort {
+				log.Fatal("Invalid port range: min > max")
+			}
 
 			ephemeralPortsRange = []uint16{uint16(ephemeralMinPort), uint16(ephemeralMaxPort)}
 		} else {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits