aboutsummaryrefslogtreecommitdiff
path: root/src/script.h
diff options
context:
space:
mode:
authorMatt Corallo <matt@bluematt.me>2012-07-02 16:29:14 +0200
committerMatt Corallo <matt@bluematt.me>2012-07-02 16:29:14 +0200
commit467b79391fd92d3af4893a702454e5d4b401263a (patch)
tree2b8a266cee29f353d356dfc5960127c50256a32c /src/script.h
parentda1103f4f8288cffc9ea475254fdeb258f04de77 (diff)
downloadbitcoin-467b79391fd92d3af4893a702454e5d4b401263a.tar.xz
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 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);