summaryrefslogtreecommitdiff
path: root/mail-mta/netqmail/files/netqmail-1.06-CVE-2005-1514.patch
diff options
context:
space:
mode:
Diffstat (limited to 'mail-mta/netqmail/files/netqmail-1.06-CVE-2005-1514.patch')
-rw-r--r--mail-mta/netqmail/files/netqmail-1.06-CVE-2005-1514.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/mail-mta/netqmail/files/netqmail-1.06-CVE-2005-1514.patch b/mail-mta/netqmail/files/netqmail-1.06-CVE-2005-1514.patch
new file mode 100644
index 000000000000..3876c290b676
--- /dev/null
+++ b/mail-mta/netqmail/files/netqmail-1.06-CVE-2005-1514.patch
@@ -0,0 +1,39 @@
+From dc617a2f2d31e4c448b806791b3f8736cf9d1ffb Mon Sep 17 00:00:00 2001
+From: Rolf Eike Beer <eike@sf-mail.de>
+Date: Tue, 12 May 2020 20:06:38 +0200
+Subject: [PATCH 2/4] fix possible signed integer overflow in commands()
+ (CVE-2005-1514)
+
+Fix it as suggested by the Qualys Security Advisory team.
+---
+ commands.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/commands.c b/commands.c
+index b0d3f61..90a50c9 100644
+--- a/commands.c
++++ b/commands.c
+@@ -10,16 +10,17 @@ int commands(ss,c)
+ substdio *ss;
+ struct commands *c;
+ {
+- int i;
++ unsigned int i;
+ char *arg;
+
+ for (;;) {
+ if (!stralloc_copys(&cmd,"")) return -1;
+
+ for (;;) {
++ int j;
+ if (!stralloc_readyplus(&cmd,1)) return -1;
+- i = substdio_get(ss,cmd.s + cmd.len,1);
+- if (i != 1) return i;
++ j = substdio_get(ss,cmd.s + cmd.len,1);
++ if (j != 1) return j;
+ if (cmd.s[cmd.len] == '\n') break;
+ ++cmd.len;
+ }
+--
+2.26.1
+