aboutsummaryrefslogtreecommitdiffstats
path: root/main/lame/CVE-2015-9099.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/lame/CVE-2015-9099.patch')
-rw-r--r--main/lame/CVE-2015-9099.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/main/lame/CVE-2015-9099.patch b/main/lame/CVE-2015-9099.patch
new file mode 100644
index 0000000000..5be534bd02
--- /dev/null
+++ b/main/lame/CVE-2015-9099.patch
@@ -0,0 +1,31 @@
+From 1ea4eac3e7d57dbad42fb067a32ac1600a0397a0 Mon Sep 17 00:00:00 2001
+From: Maks Naumov <maksqwe1@ukr.net>
+Date: Thu, 22 Jan 2015 16:20:40 +0200
+Subject: [PATCH] Add check for invalid input sample rate
+
+Signed-off-by: Maks Naumov <maksqwe1@ukr.net>
+---
+ libmp3lame/lame.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/libmp3lame/lame.c b/libmp3lame/lame.c
+index 5989160..51d689c 100644
+--- a/libmp3lame/lame.c
++++ b/libmp3lame/lame.c
+@@ -822,6 +822,12 @@ lame_init_params(lame_global_flags * gfp)
+ }
+ #endif
+
++ if (gfp->samplerate_in < 0) {
++ freegfc(gfc);
++ gfp->internal_flags = NULL;
++ return -1;
++ }
++
+ cfg->disable_reservoir = gfp->disable_reservoir;
+ cfg->lowpassfreq = gfp->lowpassfreq;
+ cfg->highpassfreq = gfp->highpassfreq;
+--
+1.9.4.msysgit.1
+
+