aboutsummaryrefslogtreecommitdiff
path: root/src/script.h
diff options
context:
space:
mode:
authorJeff Garzik <[email protected]>2012-07-03 19:50:06 -0700
committerJeff Garzik <[email protected]>2012-07-03 19:50:06 -0700
commit3ee48ba20a5ef6fd41941dc5089b0279eff30aea (patch)
tree2b8a266cee29f353d356dfc5960127c50256a32c /src/script.h
parentMerge pull request #1545 from TheBlueMatt/diffsendbuffer (diff)
parentFix signed/unsigned warnings in {script,serialize}.h (fixes #1541) (diff)
downloaddiscoin-3ee48ba20a5ef6fd41941dc5089b0279eff30aea.tar.xz
discoin-3ee48ba20a5ef6fd41941dc5089b0279eff30aea.zip
Merge pull request #1548 from TheBlueMatt/warnings
Fix signed/unsigned warnings in {script,serialize}.h (fixes #1541)
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 d490cd182..e2b83bd6e 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);