From fd00e180f54dd9dd54a2d8adb3643445a921b4ac Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 14 Sep 2017 18:30:00 +0200 Subject: [PATCH] [aes] fix out of bounds access. --- src/libsync/wordlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsync/wordlist.cpp b/src/libsync/wordlist.cpp index 4d77286da..245089bc7 100644 --- a/src/libsync/wordlist.cpp +++ b/src/libsync/wordlist.cpp @@ -2060,7 +2060,7 @@ QStringList getRandomWords(int nr) QStringList randomWords; while(randomWords.size() != nr) { - QString currWord = wordList.at(rand()); + QString currWord = wordList.at(rand() % wordList.size()); if (!randomWords.contains(currWord)) { randomWords.append(currWord); }