From 65581c10b3eedc98c80566502f5f96f52324565d Mon Sep 17 00:00:00 2001 From: Amir Shehata Date: Thu, 5 Dec 2024 14:42:01 -0500 Subject: [PATCH] prov/lnx: Initialize flags to 0 flags is allocated on the stack which might have some random values. Ensure it's initialized to 0 because if sent to SHM provider uninitialized it could cause the provider to misbehave, since it's value is being checked. Signed-off-by: Amir Shehata --- prov/lnx/include/lnx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prov/lnx/include/lnx.h b/prov/lnx/include/lnx.h index e6ed95f2efa..3d6506891e4 100644 --- a/prov/lnx/include/lnx.h +++ b/prov/lnx/include/lnx.h @@ -336,7 +336,7 @@ int lnx_create_mr(const struct iovec *iov, fi_addr_t addr, struct fi_mr_attr attr = {}; struct fi_mr_attr cur_abi_attr; struct ofi_mr_info info = {}; - uint64_t flags; + uint64_t flags = 0; int rc; attr.iov_count = 1;