You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a crash when use the Split() function, below is the details:
Version: main Steps to reproduce
func main() {
data := make([]byte, 512)
var ecctest reedsolomon.Encoder
ecctest, _ = reedsolomon.New(1, 0)
_, _ = ecctest.Split(data)
}
Log
panic: runtime error: index out of range [512] with length 512
goroutine 1 [running]:
github.com/klauspost/reedsolomon.(*reedSolomon).Split(0x1?, {0xc0000a6000, 0x0?, 0x0?})
I have read the code, and find the issues may from this code:
When len(data) == (r.totalShards * perShard) it will go to line 1577, and try to set data[512] as 0 which will cause index out of range. It seems no need to do if len(data) == (r.totalShards * perShard) ?
Thanks!
The text was updated successfully, but these errors were encountered:
Thank you for the great library!
I have a crash when use the Split() function, below is the details:
Version: main
Steps to reproduce
Log
I have read the code, and find the issues may from this code:
reedsolomon/reedsolomon.go
Line 1564 in b413df3
When
len(data) == (r.totalShards * perShard)
it will go to line 1577, and try to setdata[512]
as0
which will cause index out of range. It seems no need to do iflen(data) == (r.totalShards * perShard)
?Thanks!
The text was updated successfully, but these errors were encountered: