summaryrefslogtreecommitdiff
path: root/recipes
diff options
context:
space:
mode:
authorStanislav Brabec <utx@penguin.cz>2009-09-19 14:30:56 +0000
committerutx@penguin.cz <utx@penguin.cz>2009-09-19 14:30:56 +0000
commitbdd37476c0a55d39013e3eb615900606daa2c1e2 (patch)
tree104141a25c3f2c8446c83bef55f12115afd8b761 /recipes
parent86d4dd34f8d4ca060a1e11a8bf1b7d5ad0f76d5e (diff)
audiofile: Security fix CVE-2008-5824, coding style fixes from openSUSE, recipe simplified.
Diffstat (limited to 'recipes')
-rw-r--r--recipes/audiofile/audiofile-0.2.6/CVE-2008-5824.patch23
-rw-r--r--recipes/audiofile/audiofile-0.2.6/audiofile-0.2.6.patch67
-rw-r--r--recipes/audiofile/audiofile-0.2.6/audiofile-m4_quote_fix.diff11
-rw-r--r--recipes/audiofile/audiofile-0.2.6/audiofile-oldstyle.patch55
-rw-r--r--recipes/audiofile/audiofile_0.2.6.bb22
5 files changed, 164 insertions, 14 deletions
diff --git a/recipes/audiofile/audiofile-0.2.6/CVE-2008-5824.patch b/recipes/audiofile/audiofile-0.2.6/CVE-2008-5824.patch
new file mode 100644
index 0000000000..31233d22b3
--- /dev/null
+++ b/recipes/audiofile/audiofile-0.2.6/CVE-2008-5824.patch
@@ -0,0 +1,23 @@
+diff -Naur audiofile-0.2.6/libaudiofile/modules/msadpcm.c audiofile-0.2.6-mp/libaudiofile/modules/msadpcm.c
+--- audiofile-0.2.6/libaudiofile/modules/msadpcm.c 2004-03-06 07:39:23.000000000 +0100
++++ audiofile-0.2.6-mp/libaudiofile/modules/msadpcm.c 2009-01-20 20:05:14.919961000 +0100
+@@ -129,8 +129,7 @@
+ ms_adpcm_state *state[2];
+
+ /* Calculate the number of bytes needed for decoded data. */
+- outputLength = msadpcm->samplesPerBlock * sizeof (int16_t) *
+- msadpcm->track->f.channelCount;
++ outputLength = msadpcm->samplesPerBlock * sizeof (int16_t);
+
+ channelCount = msadpcm->track->f.channelCount;
+
+@@ -180,8 +179,7 @@
+ The first two samples have already been 'decoded' in
+ the block header.
+ */
+- samplesRemaining = (msadpcm->samplesPerBlock - 2) *
+- msadpcm->track->f.channelCount;
++ samplesRemaining = msadpcm->samplesPerBlock - 2;
+
+ while (samplesRemaining > 0)
+ {
diff --git a/recipes/audiofile/audiofile-0.2.6/audiofile-0.2.6.patch b/recipes/audiofile/audiofile-0.2.6/audiofile-0.2.6.patch
new file mode 100644
index 0000000000..b73db7efdd
--- /dev/null
+++ b/recipes/audiofile/audiofile-0.2.6/audiofile-0.2.6.patch
@@ -0,0 +1,67 @@
+--- test/instparamtest.c
++++ test/instparamtest.c
+@@ -74,4 +74,5 @@
+ printf("release loop id: %ld\n", result);
+
+ afCloseFile(file);
++ return 0;
+ }
+--- test/instparamwrite.c
++++ test/instparamwrite.c
+@@ -52,4 +52,5 @@
+ afSetInstParamLong(file, AF_DEFAULT_INST, AF_INST_NUMCENTS_DETUNE, -30);
+
+ afCloseFile(file);
++ return 0;
+ }
+--- test/loop.c
++++ test/loop.c
+@@ -34,4 +34,5 @@
+ afSetLoopEnd(file, AF_DEFAULT_INST, 2, 4);
+
+ afCloseFile(file);
++ return 0;
+ }
+--- test/twentyfour.c.xx 2005-09-16 22:38:59.000000000 +0200
++++ test/twentyfour.c 2005-09-16 22:39:53.000000000 +0200
+@@ -36,7 +36,9 @@
+ #endif
+
+ #include <stdio.h>
++#include <string.h>
+ #include <stdlib.h>
++#include <unistd.h>
+ #include <audiofile.h>
+ #include <assert.h>
+
+--- test/pipe.c.xx 2005-09-16 22:39:36.000000000 +0200
++++ test/pipe.c 2005-09-16 22:39:42.000000000 +0200
+@@ -36,6 +36,7 @@
+
+ #include <audiofile.h>
+ #include <stdio.h>
++#include <string.h>
+ #include <stdlib.h>
+
+ #define SAMPLE_COUNT 12
+--- test/error.c.xx 2005-09-16 22:40:02.000000000 +0200
++++ test/error.c 2005-09-16 22:40:11.000000000 +0200
+@@ -25,6 +25,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <audiofile.h>
+
+ int expectedError;
+--- test/testmarkers.c.xx 2005-09-16 22:40:21.000000000 +0200
++++ test/testmarkers.c 2005-09-16 22:40:41.000000000 +0200
+@@ -25,6 +25,8 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
+ #include <assert.h>
+ #include <audiofile.h>
+
diff --git a/recipes/audiofile/audiofile-0.2.6/audiofile-m4_quote_fix.diff b/recipes/audiofile/audiofile-0.2.6/audiofile-m4_quote_fix.diff
new file mode 100644
index 0000000000..1c02bf86ea
--- /dev/null
+++ b/recipes/audiofile/audiofile-0.2.6/audiofile-m4_quote_fix.diff
@@ -0,0 +1,11 @@
+--- audiofile.m4
++++ audiofile.m4
+@@ -9,7 +9,7 @@
+ dnl AM_PATH_AUDIOFILE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+ dnl Test for Audio File Library, and define AUDIOFILE_CFLAGS and AUDIOFILE_LIBS.
+ dnl
+-AC_DEFUN(AM_PATH_AUDIOFILE,
++AC_DEFUN([AM_PATH_AUDIOFILE],
+ [dnl
+ dnl Get compiler flags and libraries from the audiofile-config script.
+ dnl
diff --git a/recipes/audiofile/audiofile-0.2.6/audiofile-oldstyle.patch b/recipes/audiofile/audiofile-0.2.6/audiofile-oldstyle.patch
new file mode 100644
index 0000000000..1b21150d8c
--- /dev/null
+++ b/recipes/audiofile/audiofile-0.2.6/audiofile-oldstyle.patch
@@ -0,0 +1,55 @@
+--- libaudiofile/g711.c
++++ libaudiofile/g711.c
+@@ -81,10 +81,7 @@
+ 0xFFF, 0x1FFF, 0x3FFF, 0x7FFF};
+
+ static int
+-search(val, table, size)
+- int val;
+- short *table;
+- int size;
++search(int val, short int *table, int size)
+ {
+ int i;
+
+@@ -115,8 +112,8 @@
+ * John Wiley & Sons, pps 98-111 and 472-476.
+ */
+ unsigned char
+-_af_linear2alaw(pcm_val)
+- int pcm_val; /* 2's complement (16-bit range) */
++_af_linear2alaw(int pcm_val)
++ /* 2's complement (16-bit range) */
+ {
+ int mask;
+ int seg;
+@@ -151,8 +148,7 @@
+ *
+ */
+ int
+-_af_alaw2linear(a_val)
+- unsigned char a_val;
++_af_alaw2linear(unsigned char a_val)
+ {
+ int t;
+ int seg;
+@@ -269,8 +265,7 @@
+
+ /* A-law to u-law conversion */
+ static unsigned char
+-alaw2ulaw(aval)
+- unsigned char aval;
++alaw2ulaw(unsigned char aval)
+ {
+ aval &= 0xff;
+ return ((aval & 0x80) ? (0xFF ^ _a2u[aval ^ 0xD5]) :
+@@ -279,8 +274,7 @@
+
+ /* u-law to A-law conversion */
+ static unsigned char
+-ulaw2alaw(uval)
+- unsigned char uval;
++ulaw2alaw(unsigned char uval)
+ {
+ uval &= 0xff;
+ return ((uval & 0x80) ? (0xD5 ^ (_u2a[0xFF ^ uval] - 1)) :
diff --git a/recipes/audiofile/audiofile_0.2.6.bb b/recipes/audiofile/audiofile_0.2.6.bb
index 64a078c43b..d3f5078d4a 100644
--- a/recipes/audiofile/audiofile_0.2.6.bb
+++ b/recipes/audiofile/audiofile_0.2.6.bb
@@ -5,19 +5,13 @@ Research, Amiga IFF/8SVX, and NIST SPHERE."
SECTION = "libs"
LICENSE = "LGPL GPL"
RPROVIDES_${PN} += "audiofile"
-PR = "r6"
+PR = "r7"
-SRC_URI = "http://www.68k.org/~michael/audiofile/audiofile-${PV}.tar.gz"
+SRC_URI = "http://www.68k.org/~michael/audiofile/audiofile-${PV}.tar.gz \
+ file://audiofile-m4_quote_fix.diff;patch=1;pnum=0 \
+ file://audiofile-oldstyle.patch;patch=1;pnum=0 \
+ file://audiofile-0.2.6.patch;patch=1;pnum=0 \
+ file://CVE-2008-5824.patch;patch=1 \
+"
-inherit autotools pkgconfig binconfig
-
-do_stage () {
- install -m 0644 libaudiofile/audiofile.h libaudiofile/aupvlist.h libaudiofile/af_vfs.h ${STAGING_INCDIR}/
- oe_libinstall -C libaudiofile libaudiofile ${STAGING_LIBDIR}
- install -m 0644 audiofile.m4 ${STAGING_DATADIR}/aclocal/
-}
-
-PACKAGES += "${PN}-bin"
-FILES_${PN} = "${libdir}/libaudiofile*.so.*"
-FILES_${PN}-dev += "${bindir}/*-config"
-FILES_${PN}-bin += "${bindir}"
+inherit autotools lib_package