Skip to content

Commit cfb0728

Browse files
committed
Zero-initialize the EXPLICIT_ACCESSW objects.
This may have fixed a segfault in winpty_open. Fixes #80
1 parent 1b439b5 commit cfb0728

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ install-doc :
125125
mkdir -p $(PREFIX)/share/doc/winpty
126126
install -m 644 -p LICENSE $(PREFIX)/share/doc/winpty
127127
install -m 644 -p README.md $(PREFIX)/share/doc/winpty
128-
install -m 644 -p RELEASES.md $(PREFIX)/share/doc/winpty
128+
install -m 644 -p RELEASES*.md $(PREFIX)/share/doc/winpty
129129

130130
.PHONY : install-include
131131
install-include :

RELEASES-0.3.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Version 0.3.1 (2016-05-31)
2+
3+
This version was released solely to fix a possible crashing bug in 0.3.0.
4+
5+
Bug fixes:
6+
7+
* Fixed an uninitialized memory bug that could have crashed winpty.
8+
[#80](https://github.com/rprichard/winpty/issues/80)

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3.0
1+
0.3.1

src/shared/WindowsSecurity.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ createPipeSecurityDescriptorOwnerFullControl() {
218218
Sid localSystem;
219219
Sid builtinAdmins;
220220
Sid owner;
221-
std::array<EXPLICIT_ACCESSW, 3> daclEntries;
221+
std::array<EXPLICIT_ACCESSW, 3> daclEntries = {};
222222
Acl dacl;
223223
SecurityDescriptor value;
224224
};
@@ -258,7 +258,7 @@ createPipeSecurityDescriptorOwnerFullControlEveryoneWrite() {
258258
Sid builtinAdmins;
259259
Sid owner;
260260
Sid everyone;
261-
std::array<EXPLICIT_ACCESSW, 4> daclEntries;
261+
std::array<EXPLICIT_ACCESSW, 4> daclEntries = {};
262262
Acl dacl;
263263
SecurityDescriptor value;
264264
};

0 commit comments

Comments
 (0)