aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-05-18 03:41:18 +0800
committerDan Winship <danw@src.gnome.org>2000-05-18 03:41:18 +0800
commit43169eb17d8a9d3f7c78352ef0fae6d00376bce3 (patch)
treec6751fa42ba15bd5912ec9b60aa5570fa8dd6bdf /camel
parent14bc1cbfc8a8c492e4a280655238159e004c53b3 (diff)
downloadgsoc2013-evolution-43169eb17d8a9d3f7c78352ef0fae6d00376bce3.tar.gz
gsoc2013-evolution-43169eb17d8a9d3f7c78352ef0fae6d00376bce3.tar.zst
gsoc2013-evolution-43169eb17d8a9d3f7c78352ef0fae6d00376bce3.zip
fix an off-by-one error in address parsing (smtp_data): use
* providers/smtp/camel-smtp-transport.c (smtp_get_email_addr_from_text): fix an off-by-one error in address parsing (smtp_data): use camel_data_wrapper_get_output_stream rather than data_wrapper->output_stream svn path=/trunk/; revision=3108
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog8
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c5
2 files changed, 11 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 6ea9f7d363..1481d626bf 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,11 @@
+2000-05-17 Dan Winship <danw@helixcode.com>
+
+ * providers/smtp/camel-smtp-transport.c
+ (smtp_get_email_addr_from_text): fix an off-by-one error in
+ address parsing
+ (smtp_data): use camel_data_wrapper_get_output_stream rather than
+ data_wrapper->output_stream
+
2000-05-17 NotZed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-folder.c (message_changed): Snoop
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index 5b9e858a65..b7af97674e 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -29,6 +29,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
+#include <arpa/inet.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
@@ -437,7 +438,7 @@ static gchar
/* now addr_strt & addr_end point to the beginning & ending of the email addy */
/* copy the string into addr */
- addr = g_strndup(addr_strt, (gint)(addr_end - addr_strt));
+ addr = g_strndup(addr_strt, (gint)(addr_end - addr_strt + 1));
for (ptr1 = addr_strt; ptr1 <= addr_end; ptr1++) /* look for an '@' sign */
if (*ptr1 == '@')
@@ -614,7 +615,7 @@ smtp_data (CamelSmtpTransport *transport, CamelMedium *message, CamelException *
}
/* now to send the actual data */
- message_stream = camel_stream_buffer_new(CAMEL_DATA_WRAPPER (message)->output_stream, CAMEL_STREAM_BUFFER_READ);
+ message_stream = camel_stream_buffer_new(camel_data_wrapper_get_output_stream (CAMEL_DATA_WRAPPER (message)), CAMEL_STREAM_BUFFER_READ);
while (1) {
/* send 1 line at a time */
buf = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER(message_stream), ex);