crash in -[NSURLConnectionVCR connection:didReceiveData]

Issue #1 new
Former user created an issue

In the following pair of lines of code, the former is documented to return -1 as the expected content length under certain circumstances. The latter throws an exception when this occurs. Bounds checking expectedContentLength so it is always > 0 fixes the issue.

    long long expectedContentLength = [response expectedContentLength];
    responseData = [NSMutableData dataWithCapacity:expectedContentLength];

Comments (0)

  1. Log in to comment