*sigh*, accidentally commited a wrong chunk as well as the right chunk.
Fix length check back to what it should be.
This commit is contained in:
parent
7ff3d5f871
commit
093ddbe193
1 changed files with 1 additions and 1 deletions
|
@ -332,7 +332,7 @@ func parseScriptTemplate(script []byte, opcodemap map[byte]*opcode) ([]parsedOpc
|
||||||
off = i + 1 - op.length // beginning of data
|
off = i + 1 - op.length // beginning of data
|
||||||
// Disallow entries that do not fit script or were
|
// Disallow entries that do not fit script or were
|
||||||
// sign extended.
|
// sign extended.
|
||||||
if int(l) >= len(script[off:]) || int(l) < 0 {
|
if int(l) > len(script[off:]) || int(l) < 0 {
|
||||||
return retScript, StackErrShortScript
|
return retScript, StackErrShortScript
|
||||||
}
|
}
|
||||||
pop.data = script[off : off+int(l)]
|
pop.data = script[off : off+int(l)]
|
||||||
|
|
Loading…
Reference in a new issue