Merge branch 'kl/attr-read-attr-fromindex-msan-workaround'
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
This commit is contained in:
3
attr.c
3
attr.c
@ -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);
|
stack = read_attr_from_blob(istate, &istate->cache[sparse_dir_pos]->oid, relative_path, flags);
|
||||||
} else {
|
} else {
|
||||||
buf = read_blob_data_from_index(istate, path, &size);
|
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;
|
return stack;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user