qt5base-lts/tests/auto/corelib/tools/qbytearray
Marc Mutz 312d08b290 qstrncpy: don't call strncpy_s with invalid parameters
According to https://msdn.microsoft.com/en-us/library/5dae5d43.aspx,
strncpy_s' second argument must not be 0:

> If strDest or strSource is NULL, *or numberOfElements is 0*, the
> invalid parameter handler is invoked.

Move the existing check for len > 0 up to protect the strncpy_s
call, too.

Change-Id: I70d339ea60d4b76f3038b2e4e4756f6590a9bd31
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-09-03 05:07:54 +00:00
..
.gitattributes Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
.gitignore Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
android_testdata.qrc Android: Fix QByteArray test 2015-01-06 16:44:30 +01:00
qbytearray.pro Android: Fix QByteArray test 2015-01-06 16:44:30 +01:00
rfc3252.txt Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
tst_qbytearray_mac.mm Add shared implementation of a NSAutoreleasePool wrapper to qglobal 2015-05-27 18:45:29 +00:00
tst_qbytearray.cpp qstrncpy: don't call strncpy_s with invalid parameters 2016-09-03 05:07:54 +00:00