From 093ddbe1935156397173ca688eb1d1c579400d0a Mon Sep 17 00:00:00 2001 From: "Owain G. Ainsworth" Date: Wed, 9 Oct 2013 01:27:19 +0100 Subject: [PATCH] *sigh*, accidentally commited a wrong chunk as well as the right chunk. Fix length check back to what it should be. --- script.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.go b/script.go index 9c98a703..bd293139 100644 --- a/script.go +++ b/script.go @@ -332,7 +332,7 @@ func parseScriptTemplate(script []byte, opcodemap map[byte]*opcode) ([]parsedOpc off = i + 1 - op.length // beginning of data // Disallow entries that do not fit script or were // sign extended. - if int(l) >= len(script[off:]) || int(l) < 0 { + if int(l) > len(script[off:]) || int(l) < 0 { return retScript, StackErrShortScript } pop.data = script[off : off+int(l)]