aboutsummaryrefslogtreecommitdiff
path: root/cl/onion.cl
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2018-04-24 14:02:34 +1200
committerDavid Phillips <david@sighup.nz>2018-04-24 17:11:30 +1200
commit2fec05364409258a28a77ede1552f1cdc3eabd24 (patch)
tree0c6113c382bd1a7cb8916ba588da0e318304d95f /cl/onion.cl
parentebf9f1387ef6c57314bfc0a65fd5cae40f2a8d08 (diff)
downloadsand-leek-2fec05364409258a28a77ede1552f1cdc3eabd24.tar.xz
Fix OOB access
Thanks to alyptik for spotting this one
Diffstat (limited to 'cl/onion.cl')
-rw-r--r--cl/onion.cl2
1 files changed, 1 insertions, 1 deletions
diff --git a/cl/onion.cl b/cl/onion.cl
index 4200859..66075a9 100644
--- a/cl/onion.cl
+++ b/cl/onion.cl
@@ -32,7 +32,7 @@ void sha_chunk(unsigned char (*buf)[SHA_CHUNK_LEN], struct sha_data *sha) {
};
#pragma unroll
- for (i = 0; i < 80; i++, bo+=4) {
+ for (i = 0; i < 16; i++, bo+=4) {
w[i] = ((*buf)[bo]) << 24;
w[i] |= ((*buf)[bo+1]) << 16;
w[i] |= ((*buf)[bo+2]) << 8;