Skip to content

Commit

Permalink
Fix #213 (name collision for long names, 12+ characters)
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Sep 8, 2015
1 parent 6f496e7 commit cfeaed0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions release-notes/CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,7 @@ Ruediger Moeller (RuedigerMoeller@github)
Florian Schoppmann (fschopp@github@github)
* Reported #207: `ArrayIndexOutOfBoundsException` in `ByteQuadsCanonicalizer`
(2.6.1)

Iskren Ivov Chernev (ichernev@github)
* Reported #213: Parser is sometimes wrong when using CANONICALIZE_FIELD_NAMES
(2.6.2)
5 changes: 5 additions & 0 deletions release-notes/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ JSON library.
=== Releases ===
------------------------------------------------------------------------

2.6.2 (not yet released)

#213: Parser is sometimes wrong when using CANONICALIZE_FIELD_NAMES
(reported by ichernev@github)

2.6.1 (09-Aug-2015)

#207: `ArrayIndexOutOfBoundsException` in `ByteQuadsCanonicalizer`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,9 @@ private String _findSecondary(int origOffset, int hash, int[] q, int qlen)
for (int end = offset + bucketSize; offset < end; offset += 4) {
int len = hashArea[offset+3];
if ((hash == hashArea[offset]) && (qlen == len)) {
return _names[offset >> 2];
if (_verifyLongName(q, qlen, hashArea[offset+1])) {
return _names[offset >> 2];
}
}
if (len == 0) {
return null;
Expand Down

0 comments on commit cfeaed0

Please sign in to comment.