qt5base-lts/tests/auto/corelib
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
..
animation Extend tst_QPauseAnimation::pauseAndPropertyAnimations blacklist 2015-06-20 15:25:58 +00:00
codecs Fix utf8->utf16 BOM/ZWNBSP decoding. 2015-12-21 09:56:49 +00:00
global Fix qSetMessagePattern to have many time/backtrace parts 2016-03-25 11:03:43 +00:00
io Doc: Change instances of '(Mac) OS X' to 'macOS' 2016-08-12 08:30:29 +00:00
itemmodels tst_QStringListModel: don't leak memory when tests fail 2016-08-12 08:28:07 +00:00
json Update testdata 2016-02-17 04:50:50 +00:00
kernel Fixed Bug in QVariant comparison when containing QStringLists 2016-08-03 11:16:35 +00:00
mimetypes QMimeType: use default locale rather than system locale 2016-08-24 20:30:13 +00:00
plugin Fix qplugin autotest on Windows 2016-06-08 19:40:29 +00:00
statemachine Merge remote-tracking branch 'origin/5.5' into 5.6 2016-01-19 10:03:01 +01:00
thread tst_QAtomicInteger: fix UBs (signed overflow) 2016-03-24 16:16:15 +00:00
tools qstrncpy: don't call strncpy_s with invalid parameters 2016-09-03 05:07:54 +00:00
xml QtCore: Fix QXmlStreamReader for invalid characters in XML 1.0 2016-07-17 14:54:36 +00:00
corelib.pro iOS: Enable building of basic tests 2014-01-22 12:35:17 +01:00