diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2018-06-11 01:45:11 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2018-06-11 02:04:20 +0200 |
commit | ab144c7631ebe685ffec603e48824403fcd00cdd (patch) | |
tree | b67151692635ae2c5993d471c2a20dd8a8bdaf83 /media-sound/sox/files/sox-14.4.2-wavpack-chk-errors-on-init.patch | |
parent | media-sound/sox: One line per DEPEND (diff) | |
download | gentoo-ab144c7631ebe685ffec603e48824403fcd00cdd.tar.gz gentoo-ab144c7631ebe685ffec603e48824403fcd00cdd.tar.bz2 gentoo-ab144c7631ebe685ffec603e48824403fcd00cdd.zip |
media-sound/sox: A truckload of security
Kindly provided by Debian packaging...
Bug: https://bugs.gentoo.org/627570
Bug: https://bugs.gentoo.org/626702
Bug: https://bugs.gentoo.org/634814
Bug: https://bugs.gentoo.org/634450
Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'media-sound/sox/files/sox-14.4.2-wavpack-chk-errors-on-init.patch')
-rw-r--r-- | media-sound/sox/files/sox-14.4.2-wavpack-chk-errors-on-init.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/media-sound/sox/files/sox-14.4.2-wavpack-chk-errors-on-init.patch b/media-sound/sox/files/sox-14.4.2-wavpack-chk-errors-on-init.patch new file mode 100644 index 000000000000..4ebb31c0ae94 --- /dev/null +++ b/media-sound/sox/files/sox-14.4.2-wavpack-chk-errors-on-init.patch @@ -0,0 +1,35 @@ +Description: wavpack: check errors when initializing +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=881145 +Author: Eric Wong <normalperson@yhbt.net> + Jaromír Mikeš <mira.mikes@seznam.cz> +Forwarded: not-needed + + src/wavpack.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/wavpack.c b/src/wavpack.c +index 9e525cd4..b7e8dafa 100644 +--- a/src/wavpack.c ++++ b/src/wavpack.c +@@ -65,6 +65,10 @@ static int start_read(sox_format_t * ft) + char msg[80]; + + p->codec = WavpackOpenFileInputEx(&io_fns, ft, NULL, msg, OPEN_NORMALIZE, 0); ++ if (!p->codec) { ++ lsx_fail_errno(ft, SOX_EHDR, "%s", msg); ++ return SOX_EOF; ++ } + ft->encoding.bits_per_sample = WavpackGetBytesPerSample(p->codec) << 3; + ft->signal.channels = WavpackGetNumChannels(p->codec); + if (WavpackGetSampleRate(p->codec) && ft->signal.rate && ft->signal.rate != WavpackGetSampleRate(p->codec)) +@@ -108,6 +112,10 @@ static int start_write(sox_format_t * ft) + uint64_t size64; + + p->codec = WavpackOpenFileOutput(ft_write_b_buf, ft, NULL); ++ if (!p->codec) { ++ lsx_fail_errno(ft, SOX_ENOMEM, "WavPack error creating output instance"); ++ return SOX_EOF; ++ } + memset(&config, 0, sizeof(config)); + config.bytes_per_sample = ft->encoding.bits_per_sample >> 3; + config.bits_per_sample = ft->encoding.bits_per_sample; |