verify that a list pointer has the correct kind
This commit is contained in:
parent
104fb11104
commit
8f5f200858
1 changed files with 4 additions and 0 deletions
|
@ -1165,6 +1165,10 @@ final class WireHelpers {
|
||||||
|
|
||||||
FollowFarsResult resolved = followFars(ref, refTarget, segment);
|
FollowFarsResult resolved = followFars(ref, refTarget, segment);
|
||||||
|
|
||||||
|
if (WirePointer.kind(resolved.ref) != WirePointer.LIST) {
|
||||||
|
throw new DecodeException("Message contains non-list pointer where list was expected.");
|
||||||
|
}
|
||||||
|
|
||||||
byte elementSize = ListPointer.elementSize(resolved.ref);
|
byte elementSize = ListPointer.elementSize(resolved.ref);
|
||||||
switch (elementSize) {
|
switch (elementSize) {
|
||||||
case ElementSize.INLINE_COMPOSITE : {
|
case ElementSize.INLINE_COMPOSITE : {
|
||||||
|
|
Loading…
Reference in a new issue