commit 0162e91f219258c6aa6273126388a0c5389cac02 Author: David Fifield david@bamsoftware.com 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@lists.torproject.org