Skip to content

Commit

Permalink
contracts: update NEF script deserialization limit (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
ixje committed Apr 9, 2024
1 parent 3023b9f commit 67bff19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neo3/contracts/nef.py
Expand Up @@ -109,7 +109,7 @@ def deserialize(self, reader: serialization.BinaryReader) -> None:
if reader.read_uint16() != 0:
raise ValueError("Reserved bytes must be 0")

self.script = reader.read_var_bytes(max=512 * 1024)
self.script = reader.read_var_bytes(max=0xFFFF * 2)
if len(self.script) == 0:
raise ValueError("Deserialization error - Script can't be empty")

Expand Down

0 comments on commit 67bff19

Please sign in to comment.