projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e837a0d
)
sendmail: fix segfault if "To: email1,email2" is used
author
Denys Vlasenko
<vda.linux@googlemail.com>
Tue, 22 Aug 2017 13:53:16 +0000
(15:53 +0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Tue, 22 Aug 2017 13:53:16 +0000
(15:53 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
mailutils/sendmail.c
patch
|
blob
|
history
diff --git
a/mailutils/sendmail.c
b/mailutils/sendmail.c
index f440e6319620b6ae03d685a96fcdd5ba5496b674..defbd955263c9202b22a5a5eec6d853d01616418 100644
(file)
--- a/
mailutils/sendmail.c
+++ b/
mailutils/sendmail.c
@@
-189,8
+189,9
@@
static void rcptto(const char *s)
// send to a list of comma separated addresses
static void rcptto_list(const char *list)
{
- char *str = xstrdup(list);
- char *s = str;
+ char *free_me = xstrdup(list);
+ char *str = free_me;
+ char *s = free_me;
char prev = 0;
int in_quote = 0;
@@
-208,7
+209,7
@@
static void rcptto_list(const char *list)
}
if (prev != ',')
rcptto(angle_address(str));
- free(
str
);
+ free(
free_me
);
}
int sendmail_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;