From 77ac89c5ba8ca6f727fe4639b7f978010aa944ff Mon Sep 17 00:00:00 2001 From: EAimTY Date: Wed, 5 Apr 2023 18:28:33 +0900 Subject: [PATCH] fix wrong header unmarshaling buffer length --- tuic/src/unmarshal.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuic/src/unmarshal.rs b/tuic/src/unmarshal.rs index 5f3c307..6e53465 100644 --- a/tuic/src/unmarshal.rs +++ b/tuic/src/unmarshal.rs @@ -174,7 +174,7 @@ impl Authenticate { #[cfg(feature = "marshal")] fn read(s: &mut impl Read) -> Result { - let mut buf = [0; 32]; + let mut buf = [0; 48]; s.read_exact(&mut buf)?; let uuid = Uuid::from_slice(&buf[..16])?; let token = TryFrom::try_from(&buf[16..]).unwrap();