Skip to main content Skip to main content
Pigweed's logo Pigweed
code_xml
  1. Home
  2. Reference
  3. Rust
  4. pw_format
  5. MAX_FIELD_LEN

MAX_FIELD_LEN

Constant MAX_FIELD_LEN 

Source
pub const MAX_FIELD_LEN: u32 = 0x0001_0000;
Expand description

Maximum allowed minimum field width or precision (65,536) when formatting values at runtime.

Bounding width and precision specifier counts prevents corrupted or untrusted arguments (such as wire varints in pw_tokenizer) or malformed format strings from triggering multi-GiB heap allocations.