diff options
author | a821 | 2021-08-16 12:17:28 +0200 |
---|---|---|
committer | a821 | 2021-08-20 09:19:30 +0200 |
commit | d97211e1446eb8e34af344d50efb9ee214c30fd6 (patch) | |
tree | 252dc2da1c9951d72e5f6397b91cf407401a44e4 /fix-segfault-on-empty-to-in-headers.patch | |
parent | a2666ce8954bd30b85c99bcb4b55dbf60969299f (diff) | |
download | aur-esmtp.tar.gz |
Fixes to allow building
1. Fixes missing libesmtp-config which was removed in libesmtp-1.1 by
replacing it with pkg-config.
2. Add segfault on empty headers patch (source: debian patches).
Diffstat (limited to 'fix-segfault-on-empty-to-in-headers.patch')
-rw-r--r-- | fix-segfault-on-empty-to-in-headers.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/fix-segfault-on-empty-to-in-headers.patch b/fix-segfault-on-empty-to-in-headers.patch new file mode 100644 index 000000000000..99a9b1bd4c25 --- /dev/null +++ b/fix-segfault-on-empty-to-in-headers.patch @@ -0,0 +1,24 @@ +Description: Don't segfault if recipient header is empty +Origin: vendor +Bug-Debian: https://bugs.debian.org/636346 +Forwarded: no +Author: Salvatore Bonaccorso <carnil@debian.org> +Last-Update: 2011-08-02 + +--- a/local.c ++++ b/local.c +@@ -106,7 +106,13 @@ + } + p += written; + } +- names[--nameslen] = '\0'; /* chop trailing space */ ++ if(nameslen > 0) ++ { ++ names[--nameslen] = '\0'; /* chop trailing space */ ++ } else { ++ fprintf(stderr, "Failed to parse recipient header\n"); ++ exit(EX_DATAERR); ++ } + } else { + nameslen = (strlen(force_mda) + 3); // 'force_mda' + names = (char *)xmalloc(nameslen + 1); // 'force_mda'\0 |