diff options
author | Tim Taubert <ttaubert@mozilla.com> | 2018-05-30 09:27:51 +0200 |
---|---|---|
committer | Tim Taubert <ttaubert@mozilla.com> | 2018-05-30 09:27:51 +0200 |
commit | 08822cb4e64e092862a23d6017958bcf5c4fc29e (patch) | |
tree | 61d089744dee991e633315ee47887e2d55945bc3 | |
parent | ef4613b3d1b56f5ca3b3a6e9a164feb848e3ed3a (diff) | |
download | nss-hg-08822cb4e64e092862a23d6017958bcf5c4fc29e.tar.gz |
Bug 1464778 - tstclnt - Check pollset[STDIN_FD] before accessing r=franziskus
Reviewers: franziskus
Reviewed By: franziskus
Bug #: 1464778
Differential Revision: https://phabricator.services.mozilla.com/D1433
-rw-r--r-- | cmd/tstclnt/tstclnt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/tstclnt/tstclnt.c b/cmd/tstclnt/tstclnt.c index f6956596b..6f5a43146 100644 --- a/cmd/tstclnt/tstclnt.c +++ b/cmd/tstclnt/tstclnt.c @@ -1157,7 +1157,7 @@ run() PRInt32 filesReady; PRFileDesc *s = NULL; PRFileDesc *std_out; - PRPollDesc pollset[2]; + PRPollDesc pollset[2] = { { 0 }, { 0 } }; PRBool wrStarted = PR_FALSE; handshakeComplete = PR_FALSE; @@ -1583,7 +1583,7 @@ done: if (s) { PR_Close(s); } - if (requestFile) { + if (requestFile && pollset[STDIN_FD].fd) { PR_Close(pollset[STDIN_FD].fd); } return error; |