X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fopenssl%2Fprf.c;h=f1f3d172a5d7f2801716cd33cb2adacf73e63763;hb=df687b5ca86b93e0801db54ba4bca0f81ff02548;hp=37af2ef574b4f49bc54179ef39fb02d26e46e162;hpb=1c475ecb575367a6b3f9328b0f643ad636155341;p=tinc diff --git a/src/openssl/prf.c b/src/openssl/prf.c index 37af2ef5..f1f3d172 100644 --- a/src/openssl/prf.c +++ b/src/openssl/prf.c @@ -67,11 +67,13 @@ static bool prf_xor(int nid, const char *secret, size_t secretlen, char *seed, s } /* XOR the results of the outer HMAC into the out buffer */ - for(size_t i = 0; i < len && i < outlen; i++) { + size_t i; + + for(i = 0; i < len && i < outlen; i++) { *out++ ^= hash[i]; } - outlen -= len; + outlen -= i; } digest_close(digest);