aboutsummaryrefslogtreecommitdiffstats
path: root/main/libsndfile/CVE-2018-19758.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/libsndfile/CVE-2018-19758.patch')
-rw-r--r--main/libsndfile/CVE-2018-19758.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/main/libsndfile/CVE-2018-19758.patch b/main/libsndfile/CVE-2018-19758.patch
new file mode 100644
index 00000000000..7b4e9477bb6
--- /dev/null
+++ b/main/libsndfile/CVE-2018-19758.patch
@@ -0,0 +1,13 @@
+--- a/src/wav.c.orig
++++ b/src/wav.c
+@@ -1094,6 +1094,10 @@
+ psf_binheader_writef (psf, "44", 0, 0) ; /* SMTPE format */
+ psf_binheader_writef (psf, "44", psf->instrument->loop_count, 0) ;
+
++ /* Make sure we don't read past the loops array end. */
++ if (psf->instrument->loop_count > ARRAY_LEN (psf->instrument->loops))
++ psf->instrument->loop_count = ARRAY_LEN (psf->instrument->loops) ;
++
+ for (tmp = 0 ; tmp < psf->instrument->loop_count ; tmp++)
+ { int type ;
+