aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-11-22 22:06:28 +0100
committerMattias Andrée <maandree@operamail.com>2013-11-22 22:06:28 +0100
commit5ccf64e7fd744dad2ec4ce111e1529a0f9e30c7d (patch)
tree11f828ea8a0edf9bc225dea39674e9dd52845648
parentdo not use realloc by default, it is bad security (diff)
downloadlibpassphrase-5ccf64e7fd744dad2ec4ce111e1529a0f9e30c7d.tar.gz
libpassphrase-5ccf64e7fd744dad2ec4ce111e1529a0f9e30c7d.tar.bz2
libpassphrase-5ccf64e7fd744dad2ec4ce111e1529a0f9e30c7d.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--src/passphrase.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/passphrase.c b/src/passphrase.c
index ae7ad36..ad9062d 100644
--- a/src/passphrase.c
+++ b/src/passphrase.c
@@ -42,10 +42,6 @@ static struct termios saved_stty;
*/
char* passphrase_read(void)
{
- /* malloc and realloc returns NULL if we run out of memory,
- we will not do that under normal usecases, if we do, it
- okay to segfault on null derefencing and quit on that. */
-
char* rc = malloc(START_PASSPHRASE_LIMIT * sizeof(char));
long size = START_PASSPHRASE_LIMIT;
long len = 0;