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

[tor-commits] [flashproxy/master] Use a simpler iteration in applyMask.



commit 0162e91f219258c6aa6273126388a0c5389cac02
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Mon Nov 26 23:08:17 2012 -0800

    Use a simpler iteration in applyMask.
---
 websocket-transport/websocket.go |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/websocket-transport/websocket.go b/websocket-transport/websocket.go
index 7aca736..91a48e1 100644
--- a/websocket-transport/websocket.go
+++ b/websocket-transport/websocket.go
@@ -84,7 +84,7 @@ type Websocket struct {
 }
 
 func applyMask(payload []byte, maskKey [4]byte) {
-	for i, _ := range payload {
+	for i := 0; i < len(payload); i++ {
 		payload[i] = payload[i] ^ maskKey[i%4]
 	}
 }



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits