summaryrefslogtreecommitdiff
path: root/user/netqmail/0005-CVE-2005-1513.patch
diff options
context:
space:
mode:
authorA. Wilcox <awilcox@wilcox-tech.com>2020-06-04 00:18:43 +0000
committerA. Wilcox <awilcox@wilcox-tech.com>2020-06-04 00:18:43 +0000
commit5e4921eb5970e6b6e5ef6b20bf52148fd1f9e787 (patch)
tree81306a13d97ef903313034e4a280f4e8243cc841 /user/netqmail/0005-CVE-2005-1513.patch
parent66892fd2f8db09adc76395892ab69ba08914cd21 (diff)
parent3bec26b5deac60ba0fd00848a43fb5dd4b4ee0d4 (diff)
downloadpackages-5e4921eb5970e6b6e5ef6b20bf52148fd1f9e787.tar.gz
packages-5e4921eb5970e6b6e5ef6b20bf52148fd1f9e787.tar.bz2
packages-5e4921eb5970e6b6e5ef6b20bf52148fd1f9e787.tar.xz
packages-5e4921eb5970e6b6e5ef6b20bf52148fd1f9e787.zip
Merge branch 'skaware.20200521' into 'master'
Skaware.20200521 See merge request adelie/packages!452
Diffstat (limited to 'user/netqmail/0005-CVE-2005-1513.patch')
-rw-r--r--user/netqmail/0005-CVE-2005-1513.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/user/netqmail/0005-CVE-2005-1513.patch b/user/netqmail/0005-CVE-2005-1513.patch
new file mode 100644
index 000000000..3b3876cb3
--- /dev/null
+++ b/user/netqmail/0005-CVE-2005-1513.patch
@@ -0,0 +1,19 @@
+diff -rNU3 netqmail-1.06.old/alloc.c netqmail-1.06/alloc.c
+--- netqmail-1.06.old/alloc.c 1998-06-15 10:53:16.000000000 +0000
++++ netqmail-1.06/alloc.c 2020-05-21 11:33:24.689739728 +0000
+@@ -1,3 +1,4 @@
++#include <limits.h>
+ #include "alloc.h"
+ #include "error.h"
+ extern char *malloc();
+@@ -15,6 +16,10 @@
+ unsigned int n;
+ {
+ char *x;
++ if (n >= (INT_MAX >> 3)) {
++ errno = error_nomem;
++ return 0;
++ }
+ n = ALIGNMENT + n - (n & (ALIGNMENT - 1)); /* XXX: could overflow */
+ if (n <= avail) { avail -= n; return space + avail; }
+ x = malloc(n);