Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=gcc6.git;a=commitdiff;h=96a13f651937bd12c7a40d29ed3a2de1ad82cca8

commit 96a13f651937bd12c7a40d29ed3a2de1ad82cca8
Author: crazy <[email protected]>
Date:   Sat Sep 24 02:06:16 2016 +0200

audiofile-0.3.6-3-x86_64
* added patches to fix the build

diff --git a/source/multimedia/audiofile/FrugalBuild 
b/source/multimedia/audiofile/FrugalBuild
index 2bc75e1..8559c33 100644
--- a/source/multimedia/audiofile/FrugalBuild
+++ b/source/multimedia/audiofile/FrugalBuild
@@ -14,8 +14,14 @@ makedepends=('alsa-lib>=1.1.2-2')
groups=('multimedia')
archs=('i686' 'x86_64')
up2date="Flasttar $url"
-source=(http://www.68k.org/~michael/audiofile/audiofile-$pkgver.tar.gz)
-sha1sums=('3aba3ef724b1b5f88cfc20ab9f8ce098e6c35a0e')
+source=(https://audiofile.68k.org/audiofile-$pkgver.tar.gz \
+       audiofile-0.3.6-CVE-2015-7747.patch  \
+       audiofile-0.3.6-left-shift-neg.patch  \
+       audiofile-0.3.6-narrowing.patch)
+sha1sums=('3aba3ef724b1b5f88cfc20ab9f8ce098e6c35a0e' \
+          '6346081ce8cef0499290d5c9263ca11aaccd8afd' \
+          'ff30c320ac980268a326ca8a1f21b5ed54c8aca9' \
+          '8a64751ebb770dc66860ae952661094dbf7bac82')


# optimization OK
diff --git a/source/multimedia/audiofile/audiofile-0.3.6-CVE-2015-7747.patch 
b/source/multimedia/audiofile/audiofile-0.3.6-CVE-2015-7747.patch
new file mode 100644
index 0000000..fae65f6
--- /dev/null
+++ b/source/multimedia/audiofile/audiofile-0.3.6-CVE-2015-7747.patch
@@ -0,0 +1,12 @@
+diff -Nurb --strip-trailing-cr 
audiofile-0.3.6-orig/libaudiofile/modules/ModuleState.cpp 
audiofile-0.3.6/libaudiofile/modules/ModuleState.cpp
+--- audiofile-0.3.6-orig/libaudiofile/modules/ModuleState.cpp  2013-03-06 
06:30:03.000000000 +0100
++++ audiofile-0.3.6/libaudiofile/modules/ModuleState.cpp       2015-10-08 
11:29:51.846082162 +0200
+@@ -402,7 +402,7 @@
+               addModule(new Transform(outfc, in.pcm, out.pcm));
+
+       if (in.channelCount != out.channelCount)
+-              addModule(new ApplyChannelMatrix(infc, isReading,
++              addModule(new ApplyChannelMatrix(outfc, isReading,
+                       in.channelCount, out.channelCount,
+                       in.pcm.minClip, in.pcm.maxClip,
+                       track->channelMatrix));
diff --git a/source/multimedia/audiofile/audiofile-0.3.6-left-shift-neg.patch 
b/source/multimedia/audiofile/audiofile-0.3.6-left-shift-neg.patch
new file mode 100644
index 0000000..deef23c
--- /dev/null
+++ b/source/multimedia/audiofile/audiofile-0.3.6-left-shift-neg.patch
@@ -0,0 +1,48 @@
+diff -Nurb --strip-trailing-cr 
audiofile-0.3.6-orig/libaudiofile/modules/SimpleModule.h 
audiofile-0.3.6/libaudiofile/modules/SimpleModule.h
+--- audiofile-0.3.6-orig/libaudiofile/modules/SimpleModule.h   2013-03-06 
06:30:03.000000000 +0100
++++ audiofile-0.3.6/libaudiofile/modules/SimpleModule.h        2016-02-03 
21:19:43.065454454 +0100
+@@ -123,7 +123,7 @@
+       typedef typename IntTypes<Format>::UnsignedType UnsignedType;
+
+       static const int kScaleBits = (Format + 1) * CHAR_BIT - 1;
+-      static const int kMinSignedValue = -1 << kScaleBits;
++      static const int kMinSignedValue = 0-(1U<<kScaleBits);
+
+       struct signedToUnsigned : public std::unary_function<SignedType, 
UnsignedType>
+       {
+diff -Nurb --strip-trailing-cr audiofile-0.3.6-orig/test/FloatToInt.cpp 
audiofile-0.3.6/test/FloatToInt.cpp
+--- audiofile-0.3.6-orig/test/FloatToInt.cpp   2013-02-11 18:23:26.000000000 
+0100
++++ audiofile-0.3.6/test/FloatToInt.cpp        2016-02-03 21:21:14.714510229 
+0100
+@@ -115,7 +115,7 @@
+               EXPECT_EQ(readData[i], expectedData[i]);
+ }
+
+-static const int32_t kMinInt24 = -1<<23;
++static const int32_t kMinInt24 = 0-(1U<<23);
+ static const int32_t kMaxInt24 = (1<<23) - 1;
+
+ TEST_F(FloatToIntTest, Int24)
+diff -Nurb --strip-trailing-cr audiofile-0.3.6-orig/test/IntToFloat.cpp 
audiofile-0.3.6/test/IntToFloat.cpp
+--- audiofile-0.3.6-orig/test/IntToFloat.cpp   2013-02-11 18:23:26.000000000 
+0100
++++ audiofile-0.3.6/test/IntToFloat.cpp        2016-02-03 21:20:57.380445355 
+0100
+@@ -117,7 +117,7 @@
+               EXPECT_EQ(readData[i], expectedData[i]);
+ }
+
+-static const int32_t kMinInt24 = -1<<23;
++static const int32_t kMinInt24 = 0-(1U<<23);
+ static const int32_t kMaxInt24 = (1<<23) - 1;
+
+ TEST_F(IntToFloatTest, Int24)
+diff -Nurb --strip-trailing-cr audiofile-0.3.6-orig/test/Sign.cpp 
audiofile-0.3.6/test/Sign.cpp
+--- audiofile-0.3.6-orig/test/Sign.cpp 2013-02-11 18:23:26.000000000 +0100
++++ audiofile-0.3.6/test/Sign.cpp      2016-02-03 21:20:38.742450826 +0100
+@@ -116,7 +116,7 @@
+               EXPECT_EQ(readData[i], expectedData[i]);
+ }
+
+-static const int32_t kMinInt24 = -1<<23;
++static const int32_t kMinInt24 = 0-(1U<<23);
+ static const int32_t kMaxInt24 = (1<<23) - 1;
+ static const uint32_t kMaxUInt24 = (1<<24) - 1;
+
diff --git a/source/multimedia/audiofile/audiofile-0.3.6-narrowing.patch 
b/source/multimedia/audiofile/audiofile-0.3.6-narrowing.patch
new file mode 100644
index 0000000..f701d89
--- /dev/null
+++ b/source/multimedia/audiofile/audiofile-0.3.6-narrowing.patch
@@ -0,0 +1,52 @@
+diff -Nur audiofile-0.3.6-orig/test/NeXT.cpp audiofile-0.3.6/test/NeXT.cpp
+--- audiofile-0.3.6-orig/test/NeXT.cpp 2013-02-11 18:23:26.000000000 +0100
++++ audiofile-0.3.6/test/NeXT.cpp      2016-02-04 10:37:32.457140823 +0100
+@@ -37,13 +37,13 @@
+
+ #include "TestUtilities.h"
+
+-const char kDataUnspecifiedLength[] =
++const signed char kDataUnspecifiedLength[] =
+ {
+       '.', 's', 'n', 'd',
+       0, 0, 0, 24, // offset of 24 bytes
+-      0xff, 0xff, 0xff, 0xff, // unspecified length
++      -1, -1, -1, -1, // unspecified length
+       0, 0, 0, 3, // 16-bit linear
+-      0, 0, 172, 68, // 44100 Hz
++      0, 0, -84, 68, // 44100 Hz (0xAC44)
+       0, 0, 0, 1, // 1 channel
+       0, 1,
+       0, 1,
+@@ -57,13 +57,13 @@
+       0, 55
+ };
+
+-const char kDataTruncated[] =
++const signed char kDataTruncated[] =
+ {
+       '.', 's', 'n', 'd',
+       0, 0, 0, 24, // offset of 24 bytes
+       0, 0, 0, 20, // length of 20 bytes
+       0, 0, 0, 3, // 16-bit linear
+-      0, 0, 172, 68, // 44100 Hz
++      0, 0, -84, 68, // 44100 Hz (0xAC44)
+       0, 0, 0, 1, // 1 channel
+       0, 1,
+       0, 1,
+@@ -152,13 +152,13 @@
+       ASSERT_EQ(::unlink(testFileName.c_str()), 0);
+ }
+
+-const char kDataZeroChannels[] =
++const signed char kDataZeroChannels[] =
+ {
+       '.', 's', 'n', 'd',
+       0, 0, 0, 24, // offset of 24 bytes
+       0, 0, 0, 2, // 2 bytes
+       0, 0, 0, 3, // 16-bit linear
+-      0, 0, 172, 68, // 44100 Hz
++      0, 0, -84, 68, // 44100 Hz (0xAC44)
+       0, 0, 0, 0, // 0 channels
+       0, 1
+ };
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to