mirror of
https://github.com/jech/galene.git
synced 2024-11-09 02:05:59 +01:00
Fix index out of range in packetcache
This commit is contained in:
parent
050804b93a
commit
9533c20886
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue