summaryrefslogtreecommitdiff
path: root/media-libs/libsndfile
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-09-16 09:32:48 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-09-16 09:32:48 +0100
commit9ee6d97c2883d42f204a533a8bc1f4562df778fb (patch)
treeb690ddc0ca30f1472887edbb0b8313629bfcbbb2 /media-libs/libsndfile
parentb17a3ef12038de50228bade1f05502c74e135321 (diff)
gentoo resync : 16.09.2020
Diffstat (limited to 'media-libs/libsndfile')
-rw-r--r--media-libs/libsndfile/Manifest3
-rw-r--r--media-libs/libsndfile/files/libsndfile-1.0.29-pointer-aliasing.patch128
-rw-r--r--media-libs/libsndfile/libsndfile-1.0.29.ebuild5
3 files changed, 135 insertions, 1 deletions
diff --git a/media-libs/libsndfile/Manifest b/media-libs/libsndfile/Manifest
index 2bbecf87ca71..a820f2d167ca 100644
--- a/media-libs/libsndfile/Manifest
+++ b/media-libs/libsndfile/Manifest
@@ -6,11 +6,12 @@ AUX libsndfile-1.0.28-CVE-2017-8363.patch 857 BLAKE2B 9b053a582aed746fd00efd11f6
AUX libsndfile-1.0.28-CVE-2017-8365.patch 2577 BLAKE2B 3e9af3996f9e859717281b1e59015df64797cd757bef0ccb280c86990ca8eae2ec2550da35e71fc498bfa119c1912f391372bb4a8ffcf7abe1e82e7dc3320ff1 SHA512 f98c40696fca3e7bca867df993de55bb4145c23428e65d1a669182eb2293046478ac727ae7f94bb77123ef0355c3c53be4f9d6a432665c90c74687d8d3afd9e3
AUX libsndfile-1.0.28-CVE-2018-13139.patch 921 BLAKE2B 4fe567555b1c6e5a0c8098eee40441671a623f4ba91a03c059babc4a7a49eb4903bde38d52333335749fd6a0f6501bf524add119658226f6b169565a579b8f2d SHA512 33817e7c85180635fa239e4ea38973b18312878522639f43071188a995f0e1a35dbca6d133555fb0875292b4b609950ae38e747a6b1949f8ae840db9dc3a2805
AUX libsndfile-1.0.28-arm-varargs-failure.patch 1329 BLAKE2B d8a995e6596db880d2188cfc3243b7aff2dc13ed617b0bf589e918c5a852d4fc1d69c00eec26ec8c8b258ab00eb860872e01b149254d554cd563fd6d7b532891 SHA512 4577282dc0b71d456a562d06d8b22958f24caf383c6c4c8aa2c9006614d3110b7d6bbf896ce393468455460cb8d466c09a48416cdf159e30de6d5ecaa0d4cf09
+AUX libsndfile-1.0.29-pointer-aliasing.patch 4489 BLAKE2B 85f0e5ce1ca48fbcb23cec54560d1a3dd05f1037b7b04d5b0d06d1bcf682052e8edadbaa97e5f5d0cf93105a740595ac1d2324a6b90a8851d116c4887583446c SHA512 a11299a7d28396b11dd22b979b58c896dd15cc59b1032e83654704117122571041ea4176cdf16b1ba73ed0f4954371ecd74b7c6931e5dfa58b03d933be41bf51
DIST libsndfile-1.0.28.tar.gz 1202833 BLAKE2B 102735766e2c22b5278fde43feaaa664598c08fadb5264d5130e4bf1e354bd4202948db38e2912d7487bd7f8c0b9faf1616c0873eed886a56b1d7f49452bf488 SHA512 890731a6b8173f714155ce05eaf6d991b31632c8ab207fbae860968861a107552df26fcf85602df2e7f65502c7256c1b41735e1122485a3a07ddb580aa83b57f
DIST libsndfile-1.0.29.tar.bz2 831090 BLAKE2B 0bdf20a0abe22f628434e80c61c6b7d31e62c40dd881f462d8e12eb4488f0bcb1c0c7712fbff4902bbbea86e08763a01f7d85b875166c5c9214ab9d8aa10a1c1 SHA512 72cf038b26c66e6e085d97ef1954bd3aa76315527f632649707c76128953bfbb2c9b52527d309720ca1107a9e04e033722995911dad43b4adda46bf4a05354d7
DIST libsndfile-1.0.29_pre2_p20191024.tar.gz 720981 BLAKE2B 9f1dcf3d3669b66d8582d50b62ff863facd7125432a84a3e1e3fb0f817554f260f42948b4479371fb0967dcc75bedc6c49afffc6bee3f973a875d72d2e508210 SHA512 e37b385b90cadc97348db03b6c5ae7a8fcee17ded60f54d1508adddb8e2dc604ea44b60a0fe08627e81c0faa83997cdafb0b0ecf8574f901bf5e8a1819a63998
EBUILD libsndfile-1.0.28-r4.ebuild 1869 BLAKE2B a2cd5a12dce29bb9fb19a1da246299b3d66eb06ea4867bd5bbb224a78e4e9b8324f45d8ad0c1cf1b982360210af08aed49432503a885e15098da4db806d14b7b SHA512 f9babe5df3082d394660f54872cbb13e7a03dbfdb86f24a247302aa72fa139874e6425455b0dc624eee8b87a7809aab7324b8e1802db27e0f801ee91b9e7f9ed
-EBUILD libsndfile-1.0.29.ebuild 1858 BLAKE2B 2a30637a1dcd646d05f076b8fd9164f4f7b400404c9ece45fe0d661e0ef6ecf01c40673bdef19f9b4b202284bb9843ef8c0f493949a12a0855e2129e58cdaa39 SHA512 1cc3660d281f4c33efda5b4ee0438d07f1dfb7c9f0bf95b3e7d5e2f11e693b14aea9d5d6bbea853c5fbae93929ff8ae9173ea9c5ace30bcc18efa97939a6d425
+EBUILD libsndfile-1.0.29.ebuild 1964 BLAKE2B 3ddd7c9ae3b80967e0f78aef0f762d80d60efcfc5083e427d8002243e5f0f16f39559562697200743a62fbbb5e79264e810272a0c092c70449e45bd16f06323e SHA512 072ea1534487b6d264bf5954a4a3ac5a62d72a67db8c0a1ec19090ec6a750559348b12bf8ef421b2026713ee810f74d6c7561aa0c3f9c06cf6daa9b7bb99c3f5
EBUILD libsndfile-1.0.29_pre2_p20191024.ebuild 1664 BLAKE2B 61aaac447069d3556d50efca587950f11e24672ad6342b7c646e7bf0623c9f90971c1b64f58b15f77f0d9e32590839167510cfc114e88e3b708524648e70e418 SHA512 d46c95bd3858a30c570f9cb8b9f103d9268de79a5aa914447a3f6e60fd53c8afea12eb727d2e5395bbe0218171cdf6e39cd7017b7cf1c6ea03360ccbb1a537be
EBUILD libsndfile-9999.ebuild 1858 BLAKE2B 2a30637a1dcd646d05f076b8fd9164f4f7b400404c9ece45fe0d661e0ef6ecf01c40673bdef19f9b4b202284bb9843ef8c0f493949a12a0855e2129e58cdaa39 SHA512 1cc3660d281f4c33efda5b4ee0438d07f1dfb7c9f0bf95b3e7d5e2f11e693b14aea9d5d6bbea853c5fbae93929ff8ae9173ea9c5ace30bcc18efa97939a6d425
MISC metadata.xml 259 BLAKE2B 7339f463fc3fa87e1aba5665d97d0878dfd0ccdc4570e76adb531ce80090b0fd0eadf7ee78e3d081cd48083a800c5ecb395255df40d35f8745471346cf07ff16 SHA512 7315c86cee93f8109e30dd379dde35c51ad60e759a037cc8ee3feeec369434d65fecf785480861e7fc6a17baaf81517083284783b4b35143c911da98846d0360
diff --git a/media-libs/libsndfile/files/libsndfile-1.0.29-pointer-aliasing.patch b/media-libs/libsndfile/files/libsndfile-1.0.29-pointer-aliasing.patch
new file mode 100644
index 000000000000..644bf333413f
--- /dev/null
+++ b/media-libs/libsndfile/files/libsndfile-1.0.29-pointer-aliasing.patch
@@ -0,0 +1,128 @@
+From e5f9469a824fc660494b52ec3edc0dda2509594c Mon Sep 17 00:00:00 2001
+From: Arthur Taylor <art@ified.ca>
+Date: Tue, 8 Sep 2020 09:31:37 -0700
+Subject: [PATCH] Opus: Fix integer bug in header parsing. Fixes issue #581.
+
+Fix errors in parsing an OggOpus header packet where aliased pointers of
+different type widths are used with psf_binheader_readf(), resulting in
+incorrect data or endian issues. Telling psf_binheader_readf() to read
+an integer of fixed width, but then passing a pointer to an integer
+of a different width is a bug.
+---
+ src/ogg_opus.c | 38 ++++++++++++++++++++++----------------
+ 1 file changed, 22 insertions(+), 16 deletions(-)
+
+diff --git a/src/ogg_opus.c b/src/ogg_opus.c
+index de66b061..b40a6fb1 100644
+--- a/src/ogg_opus.c
++++ b/src/ogg_opus.c
+@@ -183,32 +183,32 @@
+ #define OGG_OPUS_PREROLL (80 * 48) /* 80 milliseconds */
+
+ typedef struct
+-{ int version ;
++{ uint8_t version ;
+
+ /* Number of channels, 1...255 */
+- int channels ;
++ uint8_t channels ;
+
+ /* Encoder latency, the amount to skip before valid data comes out. */
+- int preskip ;
++ uint16_t preskip ;
+
+ /* The sample rate of a the encoded source, as it may have been converted. */
+- int input_samplerate ;
++ int32_t input_samplerate ;
+
+ /* 'baked-in' gain to apply, dB S7.8 format. Should be zero when possible. */
+ int16_t gain ;
+
+ /* Channel mapping type. See OggOpus spec */
+- int channel_mapping ;
++ uint8_t channel_mapping ;
+
+ /* The rest is only used if channel_mapping != 0 */
+ /* How many streams are there? */
+- int nb_streams ;
++ uint8_t nb_streams ;
+
+ /* How man of those streams are coupled? (aka stereo) */
+- int nb_coupled ;
++ uint8_t nb_coupled ;
+
+ /* Mapping of opus streams to output channels */
+- unsigned char stream_map [255] ;
++ uint8_t stream_map [255] ;
+ } OpusHeader ;
+
+ typedef struct
+@@ -637,6 +637,9 @@ ogg_opus_setup_decoder (SF_PRIVATE *psf, int input_samplerate)
+ static int
+ ogg_opus_setup_encoder (SF_PRIVATE *psf, OGG_PRIVATE *odata, OPUS_PRIVATE *oopus)
+ { int error ;
++ int lookahead ;
++ int nb_streams ;
++ int nb_coupled ;
+
+ /* default page latency value (1000ms) */
+ oopus->u.encode.latency = 1000 * 48 ;
+@@ -655,16 +658,16 @@ ogg_opus_setup_encoder (SF_PRIVATE *psf, OGG_PRIVATE *odata, OPUS_PRIVATE *oopus
+
+ if (psf->sf.channels <= 2)
+ { oopus->header.channel_mapping = 0 ;
+- oopus->header.nb_streams = 1 ;
+- oopus->header.nb_coupled = psf->sf.channels - 1 ;
++ nb_streams = 1 ;
++ nb_coupled = psf->sf.channels - 1 ;
+ oopus->header.stream_map [0] = 0 ;
+ oopus->header.stream_map [1] = 1 ;
+
+ oopus->u.encode.state = opus_multistream_encoder_create (
+ psf->sf.samplerate,
+ psf->sf.channels,
+- oopus->header.nb_streams,
+- oopus->header.nb_coupled,
++ nb_streams,
++ nb_coupled,
+ oopus->header.stream_map,
+ OPUS_APPLICATION_AUDIO,
+ &error) ;
+@@ -683,17 +686,20 @@ ogg_opus_setup_encoder (SF_PRIVATE *psf, OGG_PRIVATE *odata, OPUS_PRIVATE *oopus
+ psf->sf.samplerate,
+ psf->sf.channels,
+ oopus->header.channel_mapping,
+- &oopus->header.nb_streams,
+- &oopus->header.nb_coupled,
++ &nb_streams,
++ &nb_coupled,
+ oopus->header.stream_map,
+ OPUS_APPLICATION_AUDIO,
+ &error) ;
++
+ }
+
+ if (error != OPUS_OK)
+ { psf_log_printf (psf, "Opus : Error, opus_multistream_encoder_create returned %s\n", opus_strerror (error)) ;
+ return SFE_BAD_OPEN_FORMAT ;
+ } ;
++ oopus->header.nb_streams = nb_streams ;
++ oopus->header.nb_coupled = nb_coupled ;
+
+ opus_multistream_encoder_ctl (oopus->u.encode.state, OPUS_GET_BITRATE (&oopus->u.encode.bitrate)) ;
+ psf_log_printf (psf, "Encoding at target bitrate of %dbps\n", oopus->u.encode.bitrate) ;
+@@ -711,12 +717,12 @@ ogg_opus_setup_encoder (SF_PRIVATE *psf, OGG_PRIVATE *odata, OPUS_PRIVATE *oopus
+ ** GOTCHA: This returns the preskip at the encoder samplerate, not the
+ ** granulepos rate of 48000Hz needed for header.preskip.
+ */
+- error = opus_multistream_encoder_ctl (oopus->u.encode.state, OPUS_GET_LOOKAHEAD (&oopus->header.preskip)) ;
++ error = opus_multistream_encoder_ctl (oopus->u.encode.state, OPUS_GET_LOOKAHEAD (&lookahead)) ;
+ if (error != OPUS_OK)
+ { psf_log_printf (psf, "Opus : OPUS_GET_LOOKAHEAD returned: %s\n", opus_strerror (error)) ;
+ return SFE_BAD_OPEN_FORMAT ;
+ } ;
+- oopus->header.preskip *= oopus->sr_factor ;
++ oopus->header.preskip = lookahead * oopus->sr_factor ;
+
+ oopus->len = OGG_OPUS_ENCODE_PACKET_LEN (psf->sf.samplerate) ;
+ oopus->buffer = malloc (sizeof (float) * psf->sf.channels * oopus->len) ;
diff --git a/media-libs/libsndfile/libsndfile-1.0.29.ebuild b/media-libs/libsndfile/libsndfile-1.0.29.ebuild
index d975b6e02701..37cae9590d1e 100644
--- a/media-libs/libsndfile/libsndfile-1.0.29.ebuild
+++ b/media-libs/libsndfile/libsndfile-1.0.29.ebuild
@@ -42,6 +42,11 @@ if [[ ${PV} == *9999 ]]; then
"
fi
+PATCHES=(
+ # bug 719020: backported, remove on version bump
+ "${FILESDIR}"/${P}-pointer-aliasing.patch
+)
+
pkg_setup() {
if use test || [[ ${PV} == *9999 ]]; then
python-any-r1_pkg_setup