FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

src: zero-initialize cap_data in node_credentials.cc · nodejs/node@06b3441 · GitHub

/ node Public

Commit 06b3441

Browse files
authored andcommitted
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: #64347 Reviewed-By: Jan Martin <jan.krems@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent d54fd03 commit 06b3441

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)

Back | FazBrowse Home | New Git URL