Zero-initialize the EXPLICIT_ACCESSW objects.

This may have fixed a segfault in winpty_open.

Fixes https://github.com/rprichard/winpty/issues/80
This commit is contained in:
Ryan Prichard 2016-05-31 19:34:57 -05:00
parent 87436ca8ae
commit a6fa61c17d
2 changed files with 4 additions and 2 deletions

View File

@ -16,6 +16,8 @@ Bug fixes:
* By default, `winpty.dll` avoids calling `SetProcessWindowStation` within
the calling process.
[#58](https://github.com/rprichard/winpty/issues/58)
* Fixed an uninitialized memory bug that could have crashed winpty.
[#80](https://github.com/rprichard/winpty/issues/80)
# Version 0.3.0 (2016-05-20)

View File

@ -218,7 +218,7 @@ createPipeSecurityDescriptorOwnerFullControl() {
Sid localSystem;
Sid builtinAdmins;
Sid owner;
std::array<EXPLICIT_ACCESSW, 3> daclEntries;
std::array<EXPLICIT_ACCESSW, 3> daclEntries = {};
Acl dacl;
SecurityDescriptor value;
};
@ -258,7 +258,7 @@ createPipeSecurityDescriptorOwnerFullControlEveryoneWrite() {
Sid builtinAdmins;
Sid owner;
Sid everyone;
std::array<EXPLICIT_ACCESSW, 4> daclEntries;
std::array<EXPLICIT_ACCESSW, 4> daclEntries = {};
Acl dacl;
SecurityDescriptor value;
};