You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by cx...@apache.org on 2017/03/24 15:52:44 UTC
[1/2] incubator-weex git commit: * [ios] fix list insert cell out of
bounds crash
Repository: incubator-weex
Updated Branches:
refs/heads/0.11-dev 66aeba230 -> 373ae386a
* [ios] fix list insert cell out of bounds crash
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/1d7998d1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/1d7998d1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/1d7998d1
Branch: refs/heads/0.11-dev
Commit: 1d7998d12339b54a9a4f9364526458200d6f6281
Parents: 69a69c5
Author: acton393 <zh...@gmail.com>
Authored: Fri Mar 24 23:48:44 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Fri Mar 24 23:48:44 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Component/WXListComponent.m | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1d7998d1/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m
index e019eba..bc31995 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m
@@ -407,6 +407,10 @@
WXAssert(section, @"no section found for section number:%ld", sectionNum);
NSMutableArray *completedSections;
BOOL isReload = [section.rows containsObject:cell];
+ if (!isReload && row > [section.rows count]) {
+ // protect crash when row out of bounds
+ return ;
+ }
if (!isReload) {
[section.rows insertObject:cell atIndex:row];
// deep copy
[2/2] incubator-weex git commit: Merge branch '0.11-dev' of
https://github.com/acton393/incubator-weex into 0.11-dev
Posted by cx...@apache.org.
Merge branch '0.11-dev' of https://github.com/acton393/incubator-weex into 0.11-dev
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/373ae386
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/373ae386
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/373ae386
Branch: refs/heads/0.11-dev
Commit: 373ae386a24cd7dd7d57956baa508df279bac3fd
Parents: 66aeba2 1d7998d
Author: cxfeng <cx...@apache.org>
Authored: Fri Mar 24 23:50:59 2017 +0800
Committer: cxfeng <cx...@apache.org>
Committed: Fri Mar 24 23:50:59 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Component/WXListComponent.m | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------