aboutsummaryrefslogtreecommitdiffstats
path: root/prog/alloc.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-03-28 19:01:25 +0100
committerDmitry Vyukov <dvyukov@google.com>2019-03-29 08:56:02 +0100
commitc84501fe70ad8b8ca637daebb75eed7fcc707f6a (patch)
treecd52d84eb726386ff8e0e841e4c8249f4cc4aa1d /prog/alloc.go
parent98c1bf1cfb0f9530ab2107c29a52ba15fc4fefa3 (diff)
prog: fix a bunch of bugs in parsing
Add fuzzer for Deserialize and fix 5 or so bugs it found. Fixes #1086
Diffstat (limited to 'prog/alloc.go')
-rw-r--r--prog/alloc.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/prog/alloc.go b/prog/alloc.go
index c47fc703d..344ec7a0e 100644
--- a/prog/alloc.go
+++ b/prog/alloc.go
@@ -57,7 +57,7 @@ func (ma *memAlloc) alloc(r *randGen, size0 uint64) uint64 {
}
size := (size0 + memAllocGranule - 1) / memAllocGranule
end := ma.size - size
- for start := uint64(0); start < end; start++ {
+ for start := uint64(0); start <= end; start++ {
empty := true
for i := uint64(0); i < size; i++ {
if ma.get(start + i) {