Skip to content

Commit 4b69299

Browse files
fix: Tried to fix multi version uuid parsing
1 parent f07fe48 commit 4b69299

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/byte_buf_utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ pub fn try_get_uuid(buf: &mut BytesMut) -> anyhow::Result<Uuid> {
8989
return Err(Error::msg("Not enough data"));
9090
}
9191

92-
if len > 16 {
93-
buf.advance(len - 16); // Normalize uuid length
92+
if len > 16 && read_varint(buf)? == 0 {
93+
return Err(Error::msg("No UUID in packet"));
9494
}
9595

9696
let mut bytes = [0u8; 16];

0 commit comments

Comments
 (0)