summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2014-09-22 12:11:34 +0100
committersin <sin@2f30.org>2014-09-22 12:11:34 +0100
commit97db3dcc86b5d78dde1a752f2c141f322d4a77f2 (patch)
tree5a1d398aaae1989769b133b5904155c58ade6b1d
parent9846a8d350503a8aa40388e7f88e952e3582765b (diff)
Just check p[0]
-rw-r--r--ratox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ratox.c b/ratox.c
index 7bd201a..ee97466 100644
--- a/ratox.c
+++ b/ratox.c
@@ -562,7 +562,7 @@ readpass(void)
perror("readpassphrase");
exit(EXIT_FAILURE);
}
- if (strlen(p) == 0)
+ if (p[0] == '\0')
return -1;
passphrase = malloc(strlen(p)); /* not null-terminated */
if (!passphrase) {