aboutsummaryrefslogtreecommitdiff
path: root/src/long_mode/display.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2024-06-24 14:06:22 -0700
committeriximeow <me@iximeow.net>2024-06-24 14:27:25 -0700
commitdd8bd5ce0772b08c271205508e48e98ef1c58ea8 (patch)
tree946630c89a554843dd33a9988a36bb43db48d539 /src/long_mode/display.rs
parentddde47c4c8c2058379b448894bebb3e099ea0585 (diff)
justify the current max instruction length
this is also checked by a new fuzz target
Diffstat (limited to 'src/long_mode/display.rs')
-rw-r--r--src/long_mode/display.rs4
1 files changed, 1 insertions, 3 deletions
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,
}