qt5base-lts/tests/auto/corelib/tools
Giuseppe D'Angelo 9a77171ccc QHash security fix (1.5/2): qHash two arguments overload support
Algorithmic complexity attacks against hash tables have been known
since 2003 (cf. [1, 2]), and they have been left unpatched for years
until the 2011 attacks [3] against many libraries /
(reference) implementations of programming languages.

This patch adds a qHash overload taking two arguments: the value to
be hashed, and a uint to be used as a seed for the hash function
itself (support the global QHash seed was added in a previous patch).
The seed itself is not used just yet; instead, 0 is passed.

Compatibility with the one-argument qHash(T) implementation is kept
through a catch-all template.

[1] http://www.cs.rice.edu/~scrosby/hash/CrosbyWallach_UsenixSec2003.pdf
[2] http://perldoc.perl.org/perlsec.html#Algorithmic-Complexity-Attacks
[3] http://www.ocert.org/advisories/ocert-2011-003.html

Task-number: QTBUG-23529
Change-Id: I1d0a84899476d134db455418c8043a349a7e5317
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-04-04 13:02:58 +02:00
..
qalgorithms Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qarraydata Introduce QArrayDataPointer::needsDetach 2012-04-02 16:34:21 +02:00
qbitarray Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qbytearray Add tests to verify QByteArray's zero termination 2012-03-30 11:21:34 +02:00
qbytearraymatcher Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qcache Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qchar Changed qchar unittest to check return from QFINDTESTDATA 2012-03-01 05:43:39 +01:00
qcontiguouscache Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qcryptographichash Add SHA-224, SHA-256, SHA-384, and SHA-512 support to QCryptographicHash 2012-02-27 22:24:00 +01:00
qdate Eliminate duplicate data row names from corelib autotests. 2012-02-14 06:19:16 +01:00
qdatetime Eliminate duplicate data row names from corelib autotests. 2012-02-14 06:19:16 +01:00
qeasingcurve QEasingCurve: implement move constructor 2012-02-21 15:28:40 +01:00
qelapsedtimer Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qexplicitlyshareddatapointer Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qfreelist Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qhash QHash security fix (1.5/2): qHash two arguments overload support 2012-04-04 13:02:58 +02:00
qline Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qlist Merge remote-tracking branch 'origin/master' into api_changes 2012-03-12 21:03:49 +01:00
qlocale Merge master into api_changes 2012-03-27 19:22:48 +02:00
qmap Fix loop conditions, after warnings from clang 2012-03-28 09:36:33 +02:00
qmargins Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qpair QPair: specialise QTypeInfo based on the typeinfos of its arguments 2012-03-01 14:26:06 +01:00
qpoint Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qqueue Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qrect Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qregexp Remove #if 0 sections from QRegExp autotest 2012-03-23 11:45:25 +01:00
qregularexpression QRegularExpression: minor fix to captureIndexForName 2012-03-08 22:00:53 +01:00
qringbuffer Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qscopedpointer Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qscopedvaluerollback Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qset containers: add C++11-style c{begin,end}() as alias for const{Begin,End}() 2012-03-17 09:10:57 +01:00
qsharedpointer tst_qsharedpointer: don't inherit from QSharedPointer 2012-03-23 11:22:40 +01:00
qsize Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qsizef Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qstl Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qstring QRegularExpression: support for QString overloads 2012-03-15 00:37:56 +01:00
qstringbuilder Allow QChar::SpecialCharacter with QStringBuilder. 2012-02-29 14:08:43 +01:00
qstringlist QRegularExpression: support for QStringList overloads 2012-03-21 11:43:30 +01:00
qstringmatcher Eliminate duplicate data row names from corelib autotests. 2012-02-14 06:19:16 +01:00
qstringref Eliminate duplicate data row names from corelib autotests. 2012-02-14 06:19:16 +01:00
qtextboundaryfinder Eliminate duplicate data row names from corelib autotests. 2012-02-14 06:19:16 +01:00
qtime QDateTime: Add validity checks 2012-01-31 04:18:37 +01:00
qtimeline Mark tst_qtimeline as insignificant on Windows 2012-03-15 00:50:47 +01:00
qvarlengtharray Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
qvector Merge remote-tracking branch 'gerrit/master' into containers 2012-02-05 21:26:33 +01:00
tools.pro Merge remote-tracking branch 'origin/api_changes' into containters 2012-03-08 12:02:41 +01:00