From 3eed3b472fc6a3fae895374cadbc2ef52d169697 Mon Sep 17 00:00:00 2001 From: Ashley Svetlik Date: Wed, 19 Jun 2019 10:36:04 -0500 Subject: [PATCH] Corrected If statement logic error --- roaring/roaring.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roaring/roaring.go b/roaring/roaring.go index cb1a7cb9b..d7334be05 100644 --- a/roaring/roaring.go +++ b/roaring/roaring.go @@ -3964,7 +3964,7 @@ func (op *op) UnmarshalBinary(data []byte) error { if op.typ > 1 { // This ensures that in doing 13+op.value*8, the max int won't be exceeded and a wrap around case // (resulting in a negative value) won't occur in the slice indexing while writing - if int(op.value) > int(maxBatchSize) { + if op.value > maxBatchSize { return fmt.Errorf("Maximum operation size exceeded") } if len(data) < int(13+op.value*8) {