mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-10 22:36:01 +00:00
fix variable offset bounding/comparison
This commit is contained in:
parent
71e802c740
commit
4f970a067a
@ -169,7 +169,7 @@ func readSszValue*(input: openarray[byte], T: type): T =
|
|||||||
raise newException(MalformedSszError, "SSZ field offsets are not monotonically increasing")
|
raise newException(MalformedSszError, "SSZ field offsets are not monotonically increasing")
|
||||||
elif endOffset > input.len:
|
elif endOffset > input.len:
|
||||||
raise newException(MalformedSszError, "SSZ field offset points past the end of the input")
|
raise newException(MalformedSszError, "SSZ field offset points past the end of the input")
|
||||||
elif startOffset < boundingOffsets[0]:
|
elif startOffset < minimallyExpectedSize:
|
||||||
raise newException(MalformedSszError, "SSZ field offset points outside bounding offsets")
|
raise newException(MalformedSszError, "SSZ field offset points outside bounding offsets")
|
||||||
|
|
||||||
# TODO The extra type escaping here is a work-around for a Nim issue:
|
# TODO The extra type escaping here is a work-around for a Nim issue:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user