diff --git a/src/uu/od/src/inputdecoder.rs b/src/uu/od/src/inputdecoder.rs index 377f0c4efa..3b36c28fb9 100644 --- a/src/uu/od/src/inputdecoder.rs +++ b/src/uu/od/src/inputdecoder.rs @@ -38,10 +38,7 @@ impl<'a, I> InputDecoder<'a, I> { peek_length: usize, byte_order: ByteOrder, ) -> InputDecoder { - let mut bytes: Vec = Vec::with_capacity(normal_length + peek_length); - unsafe { - bytes.set_len(normal_length + peek_length); - } // fast but uninitialized + let bytes = vec![0; normal_length + peek_length]; InputDecoder { input,