Skip to content

Commit 668f546

Browse files
authored
Fix nvme_ns_id_desc packing.
The namespace identifier length (nidl) field can be any length which could potentially lead to unaligned access.
1 parent 88bffbf commit 668f546

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/nvme/types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2955,7 +2955,7 @@ struct nvme_ns_id_desc {
29552955
__u8 nidl;
29562956
__le16 rsvd;
29572957
__u8 nid[];
2958-
};
2958+
} __attribute__((packed));
29592959

29602960
/**
29612961
* enum nvme_ns_id_desc_nidt - Known namespace identifier types

0 commit comments

Comments
 (0)