aboutsummaryrefslogtreecommitdiff
path: root/src/script.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/script.h')
-rw-r--r--src/script.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script.h b/src/script.h
index d490cd1824..e2b83bd6ee 100644
--- a/src/script.h
+++ b/src/script.h
@@ -452,7 +452,7 @@ public:
memcpy(&nSize, &pc[0], 4);
pc += 4;
}
- if (end() - pc < nSize)
+ if (end() - pc < 0 || (unsigned int)(end() - pc) < nSize)
return false;
if (pvchRet)
pvchRet->assign(pc, pc + nSize);