$OpenBSD: patch-kio_misc_kntlm_kntlm_cpp,v 1.1 2013/12/08 19:13:32 zhuk Exp $
More correct implementation of random() & Co., using arc4random().
--- kio/misc/kntlm/kntlm.cpp.orig	Sun Aug  4 22:04:50 2013
+++ kio/misc/kntlm/kntlm.cpp	Sun Aug  4 22:05:10 2013
@@ -156,7 +156,7 @@ static QByteArray createBlob (const QByteArray &target
     bl->timestamp = qToLittleEndian (now);
 
     for (uint i = 0; i < 8; i++) {
-        bl->challenge[i] = KRandom::random() % 0xff;
+        bl->challenge[i] = KRandom::uniform(0xff);
     }
 
     memcpy (blob.data() + sizeof (KNTLM::Blob), targetinfo.data(), targetinfo.size());
@@ -389,7 +389,7 @@ QByteArray KNTLM::getLMv2Response (const QString &targ
     QByteArray clientChallenge (8, 0);
 
     for (uint i = 0; i < 8; i++) {
-        clientChallenge.data() [i] = KRandom::random() % 0xff;
+        clientChallenge.data() [i] = KRandom::uniform(0xff);
     }
 
     return lmv2Response (hash, clientChallenge, challenge);
