hashicorp / yamux

Golang connection multiplexing library
Mozilla Public License 2.0
2.25k stars 236 forks source link

Session.recvLoop(): Improve sanity checking of message types. #66

Closed octo closed 2 years ago

octo commented 6 years ago

Initializing a sparse slice and then only checking upper and lower bounds is a null pointer dereference waiting to happen. Also, explicitly listing the lowest and highest identifier is brittle and prone to break in the future.

hashicorp-cla commented 5 years ago

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

evanphx commented 2 years ago

Given the age, I'm going to go ahead and close this PR. The code might be less than ideal but has served the project well thus far.