Code

Don't use memcpy when source and dest. buffers may overlap
[git.git] / git-send-email.perl
index 1c6d2cc7872ab82020d9dc32ce0086b1d3139e22..4c87c20c158fe3edfd0b770f1855e67e20038e3b 100755 (executable)
@@ -230,6 +230,9 @@ if (!defined $initial_reply_to && $prompting) {
        $initial_reply_to =~ s/(^\s+|\s+$)//g;
 }
 
+if (!$smtp_server) {
+       $smtp_server = $repo->config('sendemail.smtpserver');
+}
 if (!$smtp_server) {
        foreach (qw( /usr/sbin/sendmail /usr/lib/sendmail )) {
                if (-x $_) {
@@ -514,7 +517,7 @@ foreach my $t (@files) {
                                                $2, $_) unless $quiet;
                                        push @cc, $2;
                                }
-                               elsif (/^[-A-Za-z]+:\s+\S/) {
+                               elsif (!/^Date:\s/ && /^[-A-Za-z]+:\s+\S/) {
                                        push @xh, $_;
                                }