Fix transport message length check

wireguard-go has a bad length check in its transport message handling.
Although it cannot be exploited because of another length check earlier in the
function, this should be fixed regardless.
This commit is contained in:
Chris Branch 2018-09-20 13:28:53 +01:00 committed by Jason A. Donenfeld
parent 70bcf9ecb8
commit 7c971d7ef4

View file

@ -147,7 +147,7 @@ func (device *Device) RoutineReceiveIncoming(IP int, bind Bind) {
// check size
if len(packet) < MessageTransportType {
if len(packet) < MessageTransportSize {
continue
}