summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2017-11-26 15:22:38 +0000
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>2017-12-03 19:50:26 +0100
commitb98dbf1c5e4e76ade5f157ac10e4d4566cccc0d7 (patch)
tree11159e5b4dd93f4464723112a98f49ef50ceea4b /src
parent27fd1318f96656c85efb9d957687cbac7e96df57 (diff)
Fix filename length check in mime-handling
Diffstat (limited to 'src')
-rw-r--r--src/src/mime.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/src/mime.c b/src/src/mime.c
index 45cec29a5..5d3505a7c 100644
--- a/src/src/mime.c
+++ b/src/src/mime.c
@@ -490,6 +490,7 @@ while ((c = *fname))
val = string_catn(val, fname++, 1);
val = string_catn(val, US"?=", 2);
+*len = val->ptr;
return string_from_gstring(val);
}
@@ -646,9 +647,7 @@ while(1)
NULL, &err_msg);
DEBUG(D_acl) debug_printf_indent("MIME: plain-name %s\n", temp_string);
- size = Ustrlen(temp_string);
-
- if (size == slen)
+ if (!temp_string || (size = Ustrlen(temp_string)) == slen)
decoding_failed = TRUE;
else
/* build up a decoded filename over successive