summaryrefslogtreecommitdiff
path: root/user/vorbis-tools/vorbis-tools-CVE-2015-6749.patch
diff options
context:
space:
mode:
authorA. Wilcox <awilcox@wilcox-tech.com>2020-10-25 22:36:08 +0000
committerA. Wilcox <awilcox@wilcox-tech.com>2020-10-25 22:36:08 +0000
commit8c85a0e23abfbafc1c9d52ca0096878d90cc3a0c (patch)
tree6ec07857b815791b8d8513c5bb20f75931f4f157 /user/vorbis-tools/vorbis-tools-CVE-2015-6749.patch
parent5dd8aee9a87d9444564e81e3e57c914e8ffcf40e (diff)
parent25ce85c1d3f2f59f72b7de44700404864b2e56a5 (diff)
downloadpackages-8c85a0e23abfbafc1c9d52ca0096878d90cc3a0c.tar.gz
packages-8c85a0e23abfbafc1c9d52ca0096878d90cc3a0c.tar.bz2
packages-8c85a0e23abfbafc1c9d52ca0096878d90cc3a0c.tar.xz
packages-8c85a0e23abfbafc1c9d52ca0096878d90cc3a0c.zip
Merge branch 'vorbis-tools' into 'master'
user/vorbis-tools: Add See merge request adelie/packages!515
Diffstat (limited to 'user/vorbis-tools/vorbis-tools-CVE-2015-6749.patch')
-rw-r--r--user/vorbis-tools/vorbis-tools-CVE-2015-6749.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/user/vorbis-tools/vorbis-tools-CVE-2015-6749.patch b/user/vorbis-tools/vorbis-tools-CVE-2015-6749.patch
new file mode 100644
index 000000000..78e3c810e
--- /dev/null
+++ b/user/vorbis-tools/vorbis-tools-CVE-2015-6749.patch
@@ -0,0 +1,41 @@
+From 04815d3e1bfae3a6cdfb2c25358a5a72b61299f7 Mon Sep 17 00:00:00 2001
+From: Mark Harris <mark.hsj@gmail.com>
+Date: Sun, 30 Aug 2015 05:54:46 -0700
+Subject: [PATCH] oggenc: Fix large alloca on bad AIFF input
+
+Fixes #2212
+---
+ oggenc/audio.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/oggenc/audio.c b/oggenc/audio.c
+index 477da8c..4921fb9 100644
+--- a/oggenc/audio.c
++++ b/oggenc/audio.c
+@@ -245,8 +245,8 @@ static int aiff_permute_matrix[6][6] =
+ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen)
+ {
+ int aifc; /* AIFC or AIFF? */
+- unsigned int len;
+- unsigned char *buffer;
++ unsigned int len, readlen;
++ unsigned char buffer[22];
+ unsigned char buf2[8];
+ aiff_fmt format;
+ aifffile *aiff = malloc(sizeof(aifffile));
+@@ -269,9 +269,9 @@ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen)
+ return 0; /* Weird common chunk */
+ }
+
+- buffer = alloca(len);
+-
+- if(fread(buffer,1,len,in) < len)
++ readlen = len < sizeof(buffer) ? len : sizeof(buffer);
++ if(fread(buffer,1,readlen,in) < readlen ||
++ (len > readlen && !seek_forward(in, len-readlen)))
+ {
+ fprintf(stderr, _("Warning: Unexpected EOF in reading AIFF header\n"));
+ return 0;
+--
+2.5.0
+