aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-10-08 21:15:49 +0200
committerLeah Neukirchen <leah@vuxu.org>2017-10-08 21:15:49 +0200
commitbe6bbf6056ac6fdedb224646bea6be3c7be15267 (patch)
tree9d383b7c05b3d500d83434a49f1c98edf183e85c
parent5fe0003c982f898e6feca13ea5d0921fcb17858e (diff)
downloadmblaze-be6bbf6056ac6fdedb224646bea6be3c7be15267.tar.gz
blaze822: blaze822_addr: ensure strlen is not run on null pointer
Found by Larry Hynes.
-rw-r--r--blaze822.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/blaze822.c b/blaze822.c
index 6434055..dde42f6 100644
--- a/blaze822.c
+++ b/blaze822.c
@@ -232,11 +232,11 @@ startover:
}
char *host = strrchr(addr, '@');
- ssize_t hlen = strlen(host);
char *u;
if (host && (u = strpbrk(addr, "()<>[]:;@\\,\"")) && u < host) {
// need to "-quote local-part
+ ssize_t hlen = strlen(host);
char addr2[sizeof addr];
char *e = addr2 + sizeof addr2 - 1;
char *t;