The unified diff between revisions [d068d256..] and [257e3203..] is displayed below. It can also be downloaded as a raw diff.

This diff has been restricted to the following files: 'src/kdf.cpp'

#
#
# patch "src/kdf.cpp"
#  from [cab7bb449d0521d8f246cdddd8711aace17df617]
#    to [5a8a42038d9d402727e6ca1b11d0244954137a32]
#
============================================================
--- src/kdf.cpp	cab7bb449d0521d8f246cdddd8711aace17df617
+++ src/kdf.cpp	5a8a42038d9d402727e6ca1b11d0244954137a32
@@ -101,7 +101,7 @@ SecureVector<byte> KDF2::derive(u32bit o
    u32bit counter = 1;

    std::auto_ptr<HashFunction> hash(get_hash(hash_name));
-   while(out_len)
+   while(out_len && counter)
       {
       hash->update(secret, secret_len);
       for(u32bit j = 0; j != 4; ++j)