MCPcopy Create free account
hub / github.com/erans/pgsqlite / parse_startup_message_safely

Function parse_startup_message_safely

tests/protocol_fuzzing_test.rs:168–176  ·  view source on GitHub ↗
(input: &[u8])

Source from the content-addressed store, hash-verified

166}
167
168async fn parse_startup_message_safely(input: &[u8]) -> Result<StartupMessage, Box<dyn std::error::Error>> {
169 let mut cursor = Cursor::new(input);
170 let parser = MessageParser::new();
171
172 match parser.parse_startup_message(&mut cursor).await {
173 Ok(msg) => Ok(msg),
174 Err(e) => Err(Box::new(e))
175 }
176}
177
178async fn parse_auth_message_safely(input: &[u8]) -> Result<AuthenticationRequest, Box<dyn std::error::Error>> {
179 let mut cursor = Cursor::new(input);

Callers 1

Calls 1

parse_startup_messageMethod · 0.80

Tested by

no test coverage detected