summaryrefslogtreecommitdiff
path: root/user/wavpack/cve2018-19840.patch
diff options
context:
space:
mode:
authorA. Wilcox <awilcox@wilcox-tech.com>2018-12-08 17:31:33 +0000
committerA. Wilcox <awilcox@wilcox-tech.com>2018-12-08 17:31:33 +0000
commitbde2825df3cba470104d79b5f7dc1c0494d17bfd (patch)
tree1e38116c89741c54efd8b04e2c3b0e472d260591 /user/wavpack/cve2018-19840.patch
parent39af0df5ca8d7acd233d6cc872d184c41fbe6737 (diff)
parenta7d8e4c0862ec2c0309809f30e6d3205971c12b2 (diff)
downloadpackages-bde2825df3cba470104d79b5f7dc1c0494d17bfd.tar.gz
packages-bde2825df3cba470104d79b5f7dc1c0494d17bfd.tar.bz2
packages-bde2825df3cba470104d79b5f7dc1c0494d17bfd.tar.xz
packages-bde2825df3cba470104d79b5f7dc1c0494d17bfd.zip
Merge branch 'secfixes.aerdan.20181206' into 'master'
Security fixes for Perl and WavPack See merge request !126
Diffstat (limited to 'user/wavpack/cve2018-19840.patch')
-rw-r--r--user/wavpack/cve2018-19840.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/user/wavpack/cve2018-19840.patch b/user/wavpack/cve2018-19840.patch
new file mode 100644
index 000000000..2da022025
--- /dev/null
+++ b/user/wavpack/cve2018-19840.patch
@@ -0,0 +1,25 @@
+From 070ef6f138956d9ea9612e69586152339dbefe51 Mon Sep 17 00:00:00 2001
+From: David Bryant <david@wavpack.com>
+Date: Thu, 29 Nov 2018 21:00:42 -0800
+Subject: [PATCH] issue #53: error out on zero sample rate
+
+---
+ src/pack_utils.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/pack_utils.c b/src/pack_utils.c
+index 2253f0d..2a83497 100644
+--- a/src/pack_utils.c
++++ b/src/pack_utils.c
+@@ -195,6 +195,11 @@ int WavpackSetConfiguration64 (WavpackContext *wpc, WavpackConfig *config, int64
+ int num_chans = config->num_channels;
+ int i;
+
++ if (!config->sample_rate) {
++ strcpy (wpc->error_message, "sample rate cannot be zero!");
++ return FALSE;
++ }
++
+ wpc->stream_version = (config->flags & CONFIG_COMPATIBLE_WRITE) ? CUR_STREAM_VERS : MAX_STREAM_VERS;
+
+ if ((config->qmode & QMODE_DSD_AUDIO) && config->bytes_per_sample == 1 && config->bits_per_sample == 8) {