projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bde5a8e
)
passphrase_read: Overwrite possible references to passphrase data in local stack...
author
Shea Levy
<shea@shealevy.com>
Sat, 24 Sep 2011 17:32:13 +0000
(13:32 -0400)
committer
Shea Levy
<shea@shealevy.com>
Sat, 24 Sep 2011 17:32:40 +0000
(13:32 -0400)
Also, accidentally included termios.h here, should have been at next commit
libfreerdp-utils/passphrase.c
patch
|
blob
|
history
diff --git
a/libfreerdp-utils/passphrase.c
b/libfreerdp-utils/passphrase.c
index
58b3e20
..
57efc06
100644
(file)
--- a/
libfreerdp-utils/passphrase.c
+++ b/
libfreerdp-utils/passphrase.c
@@
-22,6
+22,7
@@
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
+#include <termios.h>
#include <unistd.h>
#include <freerdp/utils/passphrase.h>
@@
-60,10
+61,11
@@
char* freerdp_passphrase_read(const char* prompt, char* buf, size_t bufsiz)
buf_iter++;
}
}
- if (nbytes == (ssize_t) -1)
- return NULL;
*buf_iter = '\0';
buf_iter = NULL;
+ read_char = '\0';
+ if (nbytes == (ssize_t) -1)
+ return NULL;
if (close(term_id) == -1)
return NULL;