Commit 9533c208 authored by Louis Gesbert's avatar Louis Gesbert Committed by Juliusz Chroboczek

Fix index out of range in packetcache

parent 050804b9
......@@ -412,7 +412,7 @@ func (cache *Cache) GetAt(seqno uint16, index uint16, result []byte) uint16 {
cache.mu.Lock()
defer cache.mu.Unlock()
if int(index) > len(cache.entries) {
if int(index) >= len(cache.entries) {
return 0
}
if cache.entries[index].seqno != seqno {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment