diff --git a/cros_fdt/src/propval.rs b/cros_fdt/src/propval.rs index 580067a3d8..da18a0b2c0 100644 --- a/cros_fdt/src/propval.rs +++ b/cros_fdt/src/propval.rs @@ -110,7 +110,9 @@ impl ToFdtPropval for Vec { fn is_valid_string_property(bytes: &[u8]) -> bool { const PRINTABLE_ASCII: std::ops::Range = 0x20..0x7f; - bytes.iter().all(|b| PRINTABLE_ASCII.contains(b)) + bytes + .iter() + .all(|b| PRINTABLE_ASCII.contains(b) || *b == 0x0a) } #[inline]