summaryrefslogtreecommitdiff
path: root/pop3d
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2003-01-17 10:09:33 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2003-01-17 10:09:33 +0000
commit078026cd916a733b72f64f54379fba4dc777525b (patch)
treeeb7e22f7bba6be28c7baacc6e7e70ee22a606e97 /pop3d
parent595801aa6ef1c2366727aff424643c14e0237f47 (diff)
downloadmailutils-078026cd916a733b72f64f54379fba4dc777525b.tar.gz
mailutils-078026cd916a733b72f64f54379fba4dc777525b.tar.bz2
(pop3d_readline): Bugfix: add terminating zero, and check return value from gnutls_record_recv.
Diffstat (limited to 'pop3d')
-rw-r--r--pop3d/extra.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/pop3d/extra.c b/pop3d/extra.c
index 73fadd004..2b811ce6a 100644
--- a/pop3d/extra.c
+++ b/pop3d/extra.c
@@ -223,7 +223,15 @@ pop3d_readline (char *buffer, size_t size)
#ifdef WITH_TLS
if (tls_done)
{
- gnutls_record_recv (sfile, buffer, size - 1);
+ int rc = gnutls_record_recv (sfile, buffer, size - 1);
+ if (rc < 0)
+ {
+ syslog (LOG_ERR, _("TLS error on read: %s"),
+ gnutls_strerror (rc));
+ pop3d_abquit (ERR_TLS_IO);
+ }
+ else
+ buffer[rc] = 0;
ptr = buffer;
}
else

Return to:

Send suggestions and report system problems to the System administrator.