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

HFArray Bug. Unsure of exact fix. #24

Closed
swillits opened this issue Nov 17, 2013 · 1 comment
Closed

HFArray Bug. Unsure of exact fix. #24

swillits opened this issue Nov 17, 2013 · 1 comment
Milestone

Comments

@swillits
Copy link
Contributor

HFByteArray_FileWriting.m line 439: constructNewSlices() returns HFByteArray, but there's a line returning an NSArray. I've traced the return value far enough to determine there's no special-case handling of constructNewSlices returning an NSArray so it appears this is bug which will cause a crash if ever triggered.

I'm not sure of the correct fix.

static HFByteArray *constructNewSlices(...) {
    ...

    NSUInteger dirtyRangeCount = [dirtyRanges count];
    if (! dirtyRangeCount) return [NSArray arrayWithObject:slice];
@percontation
Copy link
Contributor

The "return NO;" on :458 also scares me (despite it not really breaking anything).

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