Skip to content

Commit

Permalink
Merge branch 'kl/attr-read-attr-fromindex-msan-workaround' into next
Browse files Browse the repository at this point in the history
Code clarification to avoid an appearance of using an uninitialized
variable.

* kl/attr-read-attr-fromindex-msan-workaround:
  attr: fix msan issue in read_attr_from_index
  • Loading branch information
gitster committed Jun 18, 2024
2 parents 2facee4 + 34d982c commit eebafb2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,8 @@ static struct attr_stack *read_attr_from_index(struct index_state *istate,
stack = read_attr_from_blob(istate, &istate->cache[sparse_dir_pos]->oid, relative_path, flags);
} else {
buf = read_blob_data_from_index(istate, path, &size);
stack = read_attr_from_buf(buf, size, path, flags);
if (buf)
stack = read_attr_from_buf(buf, size, path, flags);
}
return stack;
}
Expand Down

0 comments on commit eebafb2

Please sign in to comment.