mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 18:25:13 +08:00
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> PR-URL: https://github.com/nodejs/node/pull/64347 Reviewed-By: Jan Martin <jan.krems@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
fc92e9119d
commit
e7864e609c
1 file changed
+1
-1
@@ -50,7 +50,7 @@ namespace credentials {
|
||||
static bool HasOnly(int capability) {
|
||||
DCHECK(cap_valid(capability));
|
||||
|
||||
struct __user_cap_data_struct cap_data[_LINUX_CAPABILITY_U32S_3];
|
||||
struct __user_cap_data_struct cap_data[_LINUX_CAPABILITY_U32S_3] = {};
|
||||
struct __user_cap_header_struct cap_header_data = {
|
||||
_LINUX_CAPABILITY_VERSION_3,
|
||||
getpid()};
|
||||
|
||||
Reference in new issue
Block a user