From: Li Qiang <liqiang...@360.cn> The spec doesn't say the namespace label can't be zero when read/write it. As this is no harmful, just allow it.
Signed-off-by: Li Qiang <liqiang...@360.cn> --- hw/mem/nvdimm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/mem/nvdimm.c b/hw/mem/nvdimm.c index db896b0..4042097 100644 --- a/hw/mem/nvdimm.c +++ b/hw/mem/nvdimm.c @@ -114,7 +114,7 @@ static void nvdimm_realize(PCDIMMDevice *dimm, Error **errp) static void nvdimm_validate_rw_label_data(NVDIMMDevice *nvdimm, uint64_t size, uint64_t offset) { - assert((nvdimm->label_size >= size + offset) && (offset + size > offset)); + assert((nvdimm->label_size >= size + offset) && (offset + size >= offset)); } static void nvdimm_read_label_data(NVDIMMDevice *nvdimm, void *buf, -- 1.8.3.1