aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/pop3
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers/pop3')
-rw-r--r--camel/providers/pop3/camel-pop3-store.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c
index b41c27b0aa..543a6ce532 100644
--- a/camel/providers/pop3/camel-pop3-store.c
+++ b/camel/providers/pop3/camel-pop3-store.c
@@ -233,13 +233,8 @@ pop3_connect (CamelService *service, CamelException *ex)
}
sin.sin_family = h->h_addrtype;
- sin.sin_port = htons (port);
-
- /*
- * We copy only 4 bytes, as we can not trust h->h_length, as it
- * comes from the DNS and might have been tampered with.
- */
- memcpy (&sin.sin_addr, h->h_addr, 4);
+ sin.sin_port = port;
+ memcpy (&sin.sin_addr, h->h_addr, sizeof (sin.sin_addr));
fd = socket (h->h_addrtype, SOCK_STREAM, 0);
if (fd == -1 ||