AletheiaWareLLC/bcgo

ReadDelimitedProtobuf slice bounds out of range

Closed this issue · 0 comments

ReadDelimitedProtobuf hits slice bounds out of range if protobuf is small enough to fit entirely in size buffer;

Apr 09 16:16:28 bc-sfo2-01 bcservergo-linux-amd64[1466]: 2019/04/09 16:16:28 bcutils.go:883: n 32 size 3 s 1 count 31
Apr 09 16:16:28 bc-sfo2-01 bcservergo-linux-amd64[1466]: panic: runtime error: slice bounds out of range
Apr 09 16:16:28 bc-sfo2-01 bcservergo-linux-amd64[1466]: goroutine 41 [running]:
Apr 09 16:16:28 bc-sfo2-01 bcservergo-linux-amd64[1466]: github.com/AletheiaWareLLC/bcgo.ReadDelimitedProtobuf(0xc00006ef68, 0x878fa0, 0xc0000d4700, 0x780920, 0x1)
Apr 09 16:16:28 bc-sfo2-01 bcservergo-linux-amd64[1466]:         /Users/stuartscott/Documents/Projects/Go/src/github.com/AletheiaWareLLC/bcgo/bcutils.go:885 +0x7db