summaryrefslogtreecommitdiffstats
path: root/qmail-smtpd.c
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2019-04-10 09:33:47 +0200
committermanuel <manuel@mausz.at>2019-04-10 09:33:47 +0200
commit311345a4716ee14888a8e02630897d7d0c274be4 (patch)
treec231f45d44bd0bd74a3e8535fb5dbffec63f7ed6 /qmail-smtpd.c
parent9b5d3559fd8b201d62359c027b3c15faccdcce14 (diff)
downloadqmail-311345a4716ee14888a8e02630897d7d0c274be4.tar.gz
qmail-311345a4716ee14888a8e02630897d7d0c274be4.tar.bz2
qmail-311345a4716ee14888a8e02630897d7d0c274be4.zip
Fix CVE-2011-1431
Diffstat (limited to 'qmail-smtpd.c')
-rw-r--r--qmail-smtpd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/qmail-smtpd.c b/qmail-smtpd.c
index b2c0263..3352911 100644
--- a/qmail-smtpd.c
+++ b/qmail-smtpd.c
@@ -813,6 +813,9 @@ int saferead(fd,buf,len) int fd; char *buf; int len;
813 813
814char ssinbuf[1024]; 814char ssinbuf[1024];
815substdio ssin = SUBSTDIO_FDBUF(saferead,0,ssinbuf,sizeof ssinbuf); 815substdio ssin = SUBSTDIO_FDBUF(saferead,0,ssinbuf,sizeof ssinbuf);
816#ifdef TLS
817void flush_io() { ssin.p = 0; flush(); }
818#endif
816 819
817struct qmail qqt; 820struct qmail qqt;
818unsigned int bytestooverflow = 0; 821unsigned int bytestooverflow = 0;
@@ -1566,7 +1569,7 @@ struct commands smtpcommands[] = {
1566, { "rset", smtp_rset, 0 } 1569, { "rset", smtp_rset, 0 }
1567, { "help", smtp_help, flush } 1570, { "help", smtp_help, flush }
1568#ifdef TLS 1571#ifdef TLS
1569, { "starttls", smtp_tls, flush } 1572, { "starttls", smtp_tls, flush_io }
1570#endif 1573#endif
1571, { "noop", err_noop, flush } 1574, { "noop", err_noop, flush }
1572, { "vrfy", err_vrfy, flush } 1575, { "vrfy", err_vrfy, flush }