The nameMatch() function has an implicit precondition that neither
argument is nullptr: it immediately dereferences both arguments.
Prevent the crash by checking for name == nullptr early, before
passing to nameMatch().
Add tests for null and empty.
As a drive-by, make variables in the test const (needed for the
QByteArray to avoid detaching, peer pressure for the others).
Amends
|
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| euc_kr.txt | ||
| tst_qstringconverter.cpp | ||