You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public String addName(String name, int q1, int q2) {
_verifySharing();
if (_intern) {
name = InternCache.instance.intern(name);
}
int hash = (q2 == 0) ? calcHash(q1) : calcHash(q1, q2);
...
}
in which special handling is used if second "quad" is all zeroes. Presumable at some point calls were expected to be made with just q1 defined, q2 empty; and assumption probably being that this should for some reason also be supported just as an alias.
But it seems that doing this can be problematic if names (ids) with zero bytes are allowed: whether they are or not is debatable, but binary format like CBOR and Smile can technically encode such sequences. If so, there's a mismatch between "findName()" and "addName()" methods.
There also does not seem to be any good reason to have this check; plus removing it is a (small, granted) performance improvement.
So let's remove it from 2.13.0.
The text was updated successfully, but these errors were encountered:
Up to Jackson 2.12.2,
SymbolTable
has:in which special handling is used if second "quad" is all zeroes. Presumable at some point calls were expected to be made with just
q1
defined,q2
empty; and assumption probably being that this should for some reason also be supported just as an alias.But it seems that doing this can be problematic if names (ids) with zero bytes are allowed: whether they are or not is debatable, but binary format like CBOR and Smile can technically encode such sequences. If so, there's a mismatch between "findName()" and "addName()" methods.
There also does not seem to be any good reason to have this check; plus removing it is a (small, granted) performance improvement.
So let's remove it from 2.13.0.
The text was updated successfully, but these errors were encountered: