IMAP: Increment argument max length to 8000 bytes

This commit is contained in:
Maurus Decimus
2026-03-20 08:43:00 +01:00
parent a67921f18c
commit 75e548c139

View File

@@ -71,7 +71,7 @@ pub struct Receiver<T: CommandParser> {
pub start_state: State, pub start_state: State,
} }
const ARG_MAX_LEN: usize = 4096; const ARG_MAX_LEN: usize = 8000;
struct ArgumentBuffer { struct ArgumentBuffer {
buf: Vec<u8>, buf: Vec<u8>,
@@ -269,7 +269,7 @@ impl<T: CommandParser> Receiver<T> {
} }
_ => { _ => {
self.buf.push_checked(ch, ARG_MAX_LEN).map_err(|_| { self.buf.push_checked(ch, ARG_MAX_LEN).map_err(|_| {
self.error_reset("Argument exceeds maximum length of 4096 bytes.") self.error_reset("Argument exceeds maximum length of 8000 bytes.")
})?; })?;
self.state = State::Argument { last_ch: ch }; self.state = State::Argument { last_ch: ch };
} }