Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array #97

Open
jiangyuan0336 opened this issue Jan 29, 2019 · 5 comments
Open

Comments

@jiangyuan0336
Copy link

[HTTPConnection continueSendingMultiRangeResponseBody]

@jiangyuan0336
Copy link
Author

[HTTPConnection responseHasAvailableData:]_block_invoke

@jiangyuan0336
Copy link
Author

你好,最近好多问题都反应在HTTPConnection这个库上面,麻烦您看看

@jiangyuan0336
Copy link
Author

snip20190129_1

@ChangJian2333
Copy link

[HTTPConnection continueSendingMultiRangeResponseBody]
这个方法里边的 DDRange range = [[ranges objectAtIndex:rangeIndex] ddrangeValue]; 数组越界了

@jiangyuan0336
Copy link
Author

if(writeQueueSize >= READ_CHUNKSIZE) return;
if (rangeIndex > ranges.count - 1) {
// 防止数组越界崩溃
return;
}
DDRange range = [[ranges objectAtIndex:rangeIndex] ddrangeValue];
我加了这句话,不知道会不会对后面有什么影响,只是解决了数组越界问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants