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:48:41 -05:00
parent 1b439b559e
commit cfb072870f
4 changed files with 12 additions and 4 deletions

View File

@ -125,7 +125,7 @@ install-doc :
mkdir -p $(PREFIX)/share/doc/winpty
install -m 644 -p LICENSE $(PREFIX)/share/doc/winpty
install -m 644 -p README.md $(PREFIX)/share/doc/winpty
install -m 644 -p RELEASES.md $(PREFIX)/share/doc/winpty
install -m 644 -p RELEASES*.md $(PREFIX)/share/doc/winpty
.PHONY : install-include
install-include :

8
RELEASES-0.3.md Executable file
View File

@ -0,0 +1,8 @@
# Version 0.3.1 (2016-05-31)
This version was released solely to fix a possible crashing bug in 0.3.0.
Bug fixes:
* Fixed an uninitialized memory bug that could have crashed winpty.
[#80](https://github.com/rprichard/winpty/issues/80)

View File

@ -1 +1 @@
0.3.0
0.3.1

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;
};