diff --git a/Test/PropertyIntrospectionTest2_arc.m b/Test/PropertyIntrospectionTest2_arc.m index 3ec266f..506c59d 100644 --- a/Test/PropertyIntrospectionTest2_arc.m +++ b/Test/PropertyIntrospectionTest2_arc.m @@ -281,7 +281,7 @@ static BOOL testPropertyForProperty_alt(objc_property_t p, attrsList = property_copyAttributeList(p, NULL); OPT_ASSERT(0 != attrsList); objc_property_attribute_t *ra; - for (attrsCount = 0, ra = attrsList; ra->name != NULL; attrsCount++, ra++) {} + for (attrsCount = 0, ra = attrsList; (ra->name != NULL) && (attrsCount < size); attrsCount++, ra++) {} OPT_ASSERT(attrsCount == size); free(attrsList); for (unsigned int index=0; index