[aes] fix out of bounds access.

This commit is contained in:
Tomaz Canabrava 2017-09-14 18:30:00 +02:00 committed by Roeland Jago Douma
parent 60729f1fc4
commit fd00e180f5
No known key found for this signature in database
GPG key ID: F941078878347C0C

View file

@ -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);
}