diff options
| author | Sam Varshavchik | 2017-10-03 17:22:40 -0400 |
|---|---|---|
| committer | Sam Varshavchik | 2017-10-03 17:22:40 -0400 |
| commit | dc0e76d358e2446254a345dfc08cc25fa0d5ce93 (patch) | |
| tree | 7a7aa42dff9577a6c2256d1ecbe7ea8a9c374e71 /maildrop/reformail.C | |
| parent | 2f01130041ddcf084fad4ab16c1e2bf78c3311e4 (diff) | |
| download | courier-libs-dc0e76d358e2446254a345dfc08cc25fa0d5ce93.tar.bz2 | |
reformail: fix use after free.
Diffstat (limited to 'maildrop/reformail.C')
| -rw-r--r-- | maildrop/reformail.C | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/maildrop/reformail.C b/maildrop/reformail.C index d4a47d9..fec2a68 100644 --- a/maildrop/reformail.C +++ b/maildrop/reformail.C @@ -212,6 +212,8 @@ static Buffer from_header; strncmp(header, "errors-to:", 10) == 0 || strncmp(header, ">errors-to:", 11) == 0) { + const char *p; + for (p=header; *p != ':'; p++) ; return_path=p; @@ -285,7 +287,7 @@ const char *add_from_filter_header() static Buffer buf; buf.reset(); - + if (*add_from_filter_buf_ptr == '\0') { from_filter= &add_from_filter_body; |
