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

_JKDictionaryHashTableEntryForKey crashes for NULL capacity #38

Closed
jkustan opened this issue Jul 12, 2011 · 3 comments
Closed

_JKDictionaryHashTableEntryForKey crashes for NULL capacity #38

jkustan opened this issue Jul 12, 2011 · 3 comments

Comments

@jkustan
Copy link

jkustan commented Jul 12, 2011

I have had great success using JSONKit -- however today I was getting a crash in _JKDictionaryHashTableEntryForKey. As I dug in, it seems that dictionary->capacity was NULL, and the code was dying here:

NSUInteger keyHash = CFHash(aKey), keyEntry = (keyHash % dictionary->capacity), idx = 0UL;

I added a NULL check immediately above:

if(!dictionary->capacity) { return(NULL); }

and now things seem to be going through.

Jack

@omarkilani
Copy link

I think this issue is a duplicate of #31 and was fixed in 18a0a3a.

Are you using the latest git version?

@jkustan
Copy link
Author

jkustan commented Jul 13, 2011

I was using a 1.3 download, just moved up to 1.4, and manually added that
patch. Do you have a recommendation on using the latest vs. using the 1.4
download?

Thanks for putting this together!

Jack

On Wed, Jul 13, 2011 at 2:12 AM, omarkilani <
reply@reply.github.com>wrote:

I think this issue is a duplicate of #31 and was fixed in 18a0a3a.

Are you using the latest git version?

Reply to this email directly or view it on GitHub:
#38 (comment)

@ghost ghost assigned johnezang Aug 19, 2011
@johnezang
Copy link
Owner

As noted by @omarkilani, this is a known bug.

My personal recommendation is to use the latest from master (at least as of this date, which would be c2146ff).

I should probably create a stable branch as well that has all the patches since the last release.. hmmm.

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

No branches or pull requests

3 participants