Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SASL body decode #175

Merged
merged 1 commit into from
Apr 20, 2024
Merged

Fix SASL body decode #175

merged 1 commit into from
Apr 20, 2024

Conversation

wyhaya
Copy link
Contributor

@wyhaya wyhaya commented Apr 20, 2024

let mut bytes = BytesMut::new();
PgWireBackendMessage::Authentication(Authentication::SASLFinal(Bytes::from("Hello")))
        .encode(&mut bytes);
// Panic !!!
PgWireBackendMessage::decode(&mut bytes);

Error

thread 'main' panicked at /Users/.../bytes-1.6.0/src/bytes_mut.rs:386:9:
split_to out of bounds: 9 <= 5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@sunng87 sunng87 merged commit 97751a5 into sunng87:master Apr 20, 2024
6 checks passed
@sunng87
Copy link
Owner

sunng87 commented Apr 20, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants