summaryrefslogtreecommitdiff
path: root/alpine/imap.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2016-09-19 02:43:33 -0600
committerEduardo Chappa <chappa@washington.edu>2016-09-19 02:43:33 -0600
commit9ad9ae7ccf5862ae06ab65727d194d8ab7216f64 (patch)
tree30a45a1e500d8a07f568f034f217ff2f2155dde6 /alpine/imap.c
parent745455f3cfdcee60ef87764eea5ec263e7eb350e (diff)
downloadalpine-9ad9ae7ccf5862ae06ab65727d194d8ab7216f64.tar.xz
* Alpine failed to read an encrypted password file if too many
passwords have been saved in it.
Diffstat (limited to 'alpine/imap.c')
-rw-r--r--alpine/imap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/alpine/imap.c b/alpine/imap.c
index 608e6fbf..d5c97eee 100644
--- a/alpine/imap.c
+++ b/alpine/imap.c
@@ -2001,8 +2001,9 @@ line_get(char *tmp, size_t len, char **textp)
char *s;
tmp[0] = '\0';
- if (*textp == NULL || strlen(*textp) >= len - 1
- || (s = strchr(*textp, '\n')) == NULL)
+ if (*textp == NULL
+ || (s = strchr(*textp, '\n')) == NULL
+ || (s - *textp) > len - 1)
return 0;
*s = '\0';