diff options
| author | Matt Corallo <[email protected]> | 2012-07-02 16:29:14 +0200 |
|---|---|---|
| committer | Matt Corallo <[email protected]> | 2012-07-02 16:29:14 +0200 |
| commit | 467b79391fd92d3af4893a702454e5d4b401263a (patch) | |
| tree | 2b8a266cee29f353d356dfc5960127c50256a32c /src/script.h | |
| parent | Merge pull request #1545 from TheBlueMatt/diffsendbuffer (diff) | |
| download | discoin-467b79391fd92d3af4893a702454e5d4b401263a.tar.xz discoin-467b79391fd92d3af4893a702454e5d4b401263a.zip | |
Fix signed/unsigned warnings in {script,serialize}.h (fixes #1541)
Diffstat (limited to 'src/script.h')
| -rw-r--r-- | src/script.h | 2 |
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); |