qt5base-lts/tests/auto/corelib
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
..
animation Fix deadlock in QPropertyAnimation 2012-03-07 12:48:49 +01:00
codecs Move the UTF-8 data into a separate .cpp so I can use later 2012-03-23 11:22:40 +01:00
global Merge master into api_changes 2012-03-27 19:22:48 +02:00
io Revert to Qt4 behaviour that QUrl().isValid() == false 2012-03-30 01:19:59 +02:00
itemmodels Eliminate duplicate data row names from corelib autotests. 2012-02-14 06:19:16 +01:00
json Trailing comma should result in an error during JSON parsing 2012-03-12 21:38:51 +01:00
kernel Add a remainingTime() method to the public interface of the QTimer class 2012-04-03 15:10:05 +02:00
mimetypes Make comment() work in the C locale too. 2012-03-22 13:29:50 +01:00
plugin Fix QLibrary autotest for Windows 2012-02-28 12:45:28 +01:00
statemachine Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
thread Add a remainingTime() method to the public interface of the QTimer class 2012-04-03 15:10:05 +02:00
tools QHash security fix (1.5/2): qHash two arguments overload support 2012-04-04 13:02:58 +02:00
xml Eliminate duplicate data row names from corelib autotests. 2012-02-14 06:19:16 +01:00
corelib.pro Import QMimeType / QMimeDatabase into QtCore. 2012-02-18 22:19:43 +01:00