]> tinc-vpn.org Git - tinc/blobdiff - src/openssl/cipher.c
Don't leak memory during the key generation speed test.
[tinc] / src / openssl / cipher.c
index c0307f8231b5f81b094dddd61277d9e1f07669ec..5d9bebcdb68e9b4f8d1cbfac05c4c1768fa31655 100644 (file)
@@ -171,7 +171,7 @@ bool cipher_counter_xor(cipher_t *cipher, const void *indata, size_t inlen, void
                                        break;
                }
 
                                        break;
                }
 
-               *out++ = *in++ ^ cipher->counter->counter[cipher->counter->n++];
+               *out++ = *in++ ^ cipher->counter->block[cipher->counter->n++];
 
                if(cipher->counter->n >= cipher->cipher->block_size)
                        cipher->counter->n = 0;
 
                if(cipher->counter->n >= cipher->cipher->block_size)
                        cipher->counter->n = 0;