devsisters / goquic

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

server.go: fix out of range when parsing UInt64 #12

Closed igorastds closed 8 years ago

igorastds commented 8 years ago

Reading 8 bytes out of 2 byte buffer will eventually crash here. P.S. What are those magical numbers here?

hodduc commented 8 years ago

Merged. Thank you!

The length of connection ID can be 1-byte, 4-byte or 8-byte due to wire specification ( https://docs.google.com/document/d/1WJvyZflAO2pq77yOLbp9NsGjC1CHetAXV8I0fQe-B_U/ ). Unluckily almost of my test case might be 8-byte case :(