Merge pull request #223 from jeremyhannon/checkLimitBeforeUsingIndex

check 'i' limit before using it as an array index.
This commit is contained in:
Mark VanderVoord
2016-09-26 23:09:35 -04:00
committed by GitHub

View File

@ -1004,7 +1004,7 @@ void UnityAssertEqualStringLen(const char* expected,
/* if both pointers not null compare the strings */
if (expected && actual)
{
for (i = 0; (expected[i] || actual[i]) && i < length; i++)
for (i = 0; (i < length) && (expected[i] || actual[i]); i++)
{
if (expected[i] != actual[i])
{