The last 2 bytes of the struct nvme_timestamp data
are not initialized in nvme_set_features_timestamp().
Add an initializer to avoid sending uninitialized stack memory
to the controller.
Signed-off-by: Caleb Sander <csander@purestorage.com>
int nvme_set_features_timestamp(int fd, bool save, __u64 timestamp)
{
__le64 t = cpu_to_le64(timestamp);
- struct nvme_timestamp ts;
+ struct nvme_timestamp ts = {};
struct nvme_set_features_args args = {
.args_size = sizeof(args),
.fd = fd,