Skip to content

Commit

Permalink
prov/lnx: Initialize flags to 0
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
amirshehataornl authored and aingerson committed Dec 6, 2024
1 parent 3b85472 commit 65581c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prov/lnx/include/lnx.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 65581c1

Please sign in to comment.