devsisters / goquic

QUIC support for Go
http://devsisters.github.io/goquic/
BSD 3-Clause "New" or "Revised" License
944 stars 100 forks source link

Fix panic: index out of range when packet length is zero #61

Closed junsooo closed 4 years ago

junsooo commented 4 years ago

When reading a packet of length zero, program panic with runtime error: index out of range because the code always accesses first byte of buffer. (https://github.com/devsisters/goquic/blob/master/dispatcher.go#L51) Fixed it.