diff options
author | Dmitry Tikhov <ddtikhov@gmail.com> | 2022-04-12 11:59:09 +0300 |
---|---|---|
committer | Klaus Jensen <k.jensen@samsung.com> | 2022-06-03 21:48:24 +0200 |
commit | 1e64facc015e16d8e4efa239feaeda9e4e9aeb04 (patch) | |
tree | d0fc69fe0df895ba7fc7ef2dc4d4c58d2b912ca6 /hw/nvme/subsys.c | |
parent | 70e975203f366f2f30daaeb714bb852562b7b72f (diff) | |
download | qemu-1e64facc015e16d8e4efa239feaeda9e4e9aeb04.zip qemu-1e64facc015e16d8e4efa239feaeda9e4e9aeb04.tar.gz qemu-1e64facc015e16d8e4efa239feaeda9e4e9aeb04.tar.bz2 |
hw/nvme: fix narrowing conversion
Since nlbas is of type int, it does not work with large namespace size
values, e.g., 9 TB size of file backing namespace and 8 byte metadata
with 4096 bytes lbasz gives negative nlbas value, which is later
promoted to negative int64_t type value and results in negative
ns->moff which breaks namespace
Signed-off-by: Dmitry Tikhov <ddtikhov@gmail.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Diffstat (limited to 'hw/nvme/subsys.c')
0 files changed, 0 insertions, 0 deletions