summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2013-09-15 18:51:36 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-17 09:31:35 +0200
commitbcb68461c9b0b3e074e63fe92458b650b1933ef0 (patch)
tree1fe8da21b696535c32ca638912b4575dcaec2475 /tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
parent250190b39bed279ca075bf1f2b2aaf6839bb9be4 (diff)
QMap: don't dereference nullptr II
root(), leftNode() and rightNode() can be nullptr. These pieces of code happened to work because the first thing lowerBound() does is Node *n = this; // ... while (n) // ... But that is _after_ dereferencing nullptr, which is undefined behavior. So, check first, then deref. This is the completion of I9137bf6e21014cd68404a7e49a748910b1d768cf: all uses of root(), leftNode() and rightNode() have now been manually checked. Change-Id: I3fcb958af9362104f94d6eea9c62da2ae07f1d5e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp')
0 files changed, 0 insertions, 0 deletions