From dd8bd5ce0772b08c271205508e48e98ef1c58ea8 Mon Sep 17 00:00:00 2001 From: iximeow Date: Mon, 24 Jun 2024 14:06:22 -0700 Subject: justify the current max instruction length this is also checked by a new fuzz target --- src/long_mode/display.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/long_mode') diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs index 1193f35..89d952b 100644 --- a/src/long_mode/display.rs +++ b/src/long_mode/display.rs @@ -4410,9 +4410,7 @@ mod buffer_sink { /// settings format instructions identically to their corresponding `fmt::Display`. pub fn new() -> Self { let mut buf = alloc::string::String::new(); - // TODO: move 512 out to a MAX_INSTRUCTION_LEN const and appropriate justification (and - // fuzzing and ..) - buf.reserve(512); + buf.reserve(crate::MAX_INSTRUCTION_LEN); Self { content: buf, } -- cgit v1.1