Skip to content

Commit cf823b7

Browse files
committed
src: zero-initialize cap_data in node_credentials.cc
zero-initialize the cap_data array to prevent MSan warnings about using uninitialized memory Signed-off-by: Sam Kapust <samkapust@google.com>
1 parent 4ee2117 commit cf823b7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/node_credentials.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ namespace credentials {
5050
static bool HasOnly(int capability) {
5151
DCHECK(cap_valid(capability));
5252

53-
struct __user_cap_data_struct cap_data[_LINUX_CAPABILITY_U32S_3];
53+
struct __user_cap_data_struct cap_data[_LINUX_CAPABILITY_U32S_3] = {};
5454
struct __user_cap_header_struct cap_header_data = {
5555
_LINUX_CAPABILITY_VERSION_3,
5656
getpid()};

0 commit comments

Comments
 (0)