diff options
author | Koen Kooi <koen@dominion.thruhere.net> | 2011-06-03 19:20:18 +0200 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-06-03 19:20:18 +0200 |
commit | 3e32248ba1f25def2b4182c9f29661a79ad597e3 (patch) | |
tree | b37c3abea73426a136be4f171e8a9d8fdab2ceef | |
parent | 6136b9f7544319b107b599fcb5ec8bea4fa08dca (diff) | |
download | meta-openembedded-3e32248ba1f25def2b4182c9f29661a79ad597e3.tar.gz |
audiofile: import from OE rev 7ae56b81f8cc22f9ef13a48cde000e32138948ea
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
5 files changed, 176 insertions, 0 deletions
diff --git a/meta-oe/recipes-multimedia/audiofile/audiofile-0.2.6/CVE-2008-5824.patch b/meta-oe/recipes-multimedia/audiofile/audiofile-0.2.6/CVE-2008-5824.patch new file mode 100644 index 000000000..31233d22b --- /dev/null +++ b/meta-oe/recipes-multimedia/audiofile/audiofile-0.2.6/CVE-2008-5824.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | diff -Naur audiofile-0.2.6/libaudiofile/modules/msadpcm.c audiofile-0.2.6-mp/libaudiofile/modules/msadpcm.c | ||
2 | --- audiofile-0.2.6/libaudiofile/modules/msadpcm.c 2004-03-06 07:39:23.000000000 +0100 | ||
3 | +++ audiofile-0.2.6-mp/libaudiofile/modules/msadpcm.c 2009-01-20 20:05:14.919961000 +0100 | ||
4 | @@ -129,8 +129,7 @@ | ||
5 | ms_adpcm_state *state[2]; | ||
6 | |||
7 | /* Calculate the number of bytes needed for decoded data. */ | ||
8 | - outputLength = msadpcm->samplesPerBlock * sizeof (int16_t) * | ||
9 | - msadpcm->track->f.channelCount; | ||
10 | + outputLength = msadpcm->samplesPerBlock * sizeof (int16_t); | ||
11 | |||
12 | channelCount = msadpcm->track->f.channelCount; | ||
13 | |||
14 | @@ -180,8 +179,7 @@ | ||
15 | The first two samples have already been 'decoded' in | ||
16 | the block header. | ||
17 | */ | ||
18 | - samplesRemaining = (msadpcm->samplesPerBlock - 2) * | ||
19 | - msadpcm->track->f.channelCount; | ||
20 | + samplesRemaining = msadpcm->samplesPerBlock - 2; | ||
21 | |||
22 | while (samplesRemaining > 0) | ||
23 | { | ||
diff --git a/meta-oe/recipes-multimedia/audiofile/audiofile-0.2.6/audiofile-0.2.6.patch b/meta-oe/recipes-multimedia/audiofile/audiofile-0.2.6/audiofile-0.2.6.patch new file mode 100644 index 000000000..b73db7efd --- /dev/null +++ b/meta-oe/recipes-multimedia/audiofile/audiofile-0.2.6/audiofile-0.2.6.patch | |||
@@ -0,0 +1,67 @@ | |||
1 | --- test/instparamtest.c | ||
2 | +++ test/instparamtest.c | ||
3 | @@ -74,4 +74,5 @@ | ||
4 | printf("release loop id: %ld\n", result); | ||
5 | |||
6 | afCloseFile(file); | ||
7 | + return 0; | ||
8 | } | ||
9 | --- test/instparamwrite.c | ||
10 | +++ test/instparamwrite.c | ||
11 | @@ -52,4 +52,5 @@ | ||
12 | afSetInstParamLong(file, AF_DEFAULT_INST, AF_INST_NUMCENTS_DETUNE, -30); | ||
13 | |||
14 | afCloseFile(file); | ||
15 | + return 0; | ||
16 | } | ||
17 | --- test/loop.c | ||
18 | +++ test/loop.c | ||
19 | @@ -34,4 +34,5 @@ | ||
20 | afSetLoopEnd(file, AF_DEFAULT_INST, 2, 4); | ||
21 | |||
22 | afCloseFile(file); | ||
23 | + return 0; | ||
24 | } | ||
25 | --- test/twentyfour.c.xx 2005-09-16 22:38:59.000000000 +0200 | ||
26 | +++ test/twentyfour.c 2005-09-16 22:39:53.000000000 +0200 | ||
27 | @@ -36,7 +36,9 @@ | ||
28 | #endif | ||
29 | |||
30 | #include <stdio.h> | ||
31 | +#include <string.h> | ||
32 | #include <stdlib.h> | ||
33 | +#include <unistd.h> | ||
34 | #include <audiofile.h> | ||
35 | #include <assert.h> | ||
36 | |||
37 | --- test/pipe.c.xx 2005-09-16 22:39:36.000000000 +0200 | ||
38 | +++ test/pipe.c 2005-09-16 22:39:42.000000000 +0200 | ||
39 | @@ -36,6 +36,7 @@ | ||
40 | |||
41 | #include <audiofile.h> | ||
42 | #include <stdio.h> | ||
43 | +#include <string.h> | ||
44 | #include <stdlib.h> | ||
45 | |||
46 | #define SAMPLE_COUNT 12 | ||
47 | --- test/error.c.xx 2005-09-16 22:40:02.000000000 +0200 | ||
48 | +++ test/error.c 2005-09-16 22:40:11.000000000 +0200 | ||
49 | @@ -25,6 +25,7 @@ | ||
50 | |||
51 | #include <stdio.h> | ||
52 | #include <stdlib.h> | ||
53 | +#include <string.h> | ||
54 | #include <audiofile.h> | ||
55 | |||
56 | int expectedError; | ||
57 | --- test/testmarkers.c.xx 2005-09-16 22:40:21.000000000 +0200 | ||
58 | +++ test/testmarkers.c 2005-09-16 22:40:41.000000000 +0200 | ||
59 | @@ -25,6 +25,8 @@ | ||
60 | |||
61 | #include <stdio.h> | ||
62 | #include <stdlib.h> | ||
63 | +#include <string.h> | ||
64 | +#include <unistd.h> | ||
65 | #include <assert.h> | ||
66 | #include <audiofile.h> | ||
67 | |||
diff --git a/meta-oe/recipes-multimedia/audiofile/audiofile-0.2.6/audiofile-m4_quote_fix.diff b/meta-oe/recipes-multimedia/audiofile/audiofile-0.2.6/audiofile-m4_quote_fix.diff new file mode 100644 index 000000000..1c02bf86e --- /dev/null +++ b/meta-oe/recipes-multimedia/audiofile/audiofile-0.2.6/audiofile-m4_quote_fix.diff | |||
@@ -0,0 +1,11 @@ | |||
1 | --- audiofile.m4 | ||
2 | +++ audiofile.m4 | ||
3 | @@ -9,7 +9,7 @@ | ||
4 | dnl AM_PATH_AUDIOFILE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) | ||
5 | dnl Test for Audio File Library, and define AUDIOFILE_CFLAGS and AUDIOFILE_LIBS. | ||
6 | dnl | ||
7 | -AC_DEFUN(AM_PATH_AUDIOFILE, | ||
8 | +AC_DEFUN([AM_PATH_AUDIOFILE], | ||
9 | [dnl | ||
10 | dnl Get compiler flags and libraries from the audiofile-config script. | ||
11 | dnl | ||
diff --git a/meta-oe/recipes-multimedia/audiofile/audiofile-0.2.6/audiofile-oldstyle.patch b/meta-oe/recipes-multimedia/audiofile/audiofile-0.2.6/audiofile-oldstyle.patch new file mode 100644 index 000000000..1b21150d8 --- /dev/null +++ b/meta-oe/recipes-multimedia/audiofile/audiofile-0.2.6/audiofile-oldstyle.patch | |||
@@ -0,0 +1,55 @@ | |||
1 | --- libaudiofile/g711.c | ||
2 | +++ libaudiofile/g711.c | ||
3 | @@ -81,10 +81,7 @@ | ||
4 | 0xFFF, 0x1FFF, 0x3FFF, 0x7FFF}; | ||
5 | |||
6 | static int | ||
7 | -search(val, table, size) | ||
8 | - int val; | ||
9 | - short *table; | ||
10 | - int size; | ||
11 | +search(int val, short int *table, int size) | ||
12 | { | ||
13 | int i; | ||
14 | |||
15 | @@ -115,8 +112,8 @@ | ||
16 | * John Wiley & Sons, pps 98-111 and 472-476. | ||
17 | */ | ||
18 | unsigned char | ||
19 | -_af_linear2alaw(pcm_val) | ||
20 | - int pcm_val; /* 2's complement (16-bit range) */ | ||
21 | +_af_linear2alaw(int pcm_val) | ||
22 | + /* 2's complement (16-bit range) */ | ||
23 | { | ||
24 | int mask; | ||
25 | int seg; | ||
26 | @@ -151,8 +148,7 @@ | ||
27 | * | ||
28 | */ | ||
29 | int | ||
30 | -_af_alaw2linear(a_val) | ||
31 | - unsigned char a_val; | ||
32 | +_af_alaw2linear(unsigned char a_val) | ||
33 | { | ||
34 | int t; | ||
35 | int seg; | ||
36 | @@ -269,8 +265,7 @@ | ||
37 | |||
38 | /* A-law to u-law conversion */ | ||
39 | static unsigned char | ||
40 | -alaw2ulaw(aval) | ||
41 | - unsigned char aval; | ||
42 | +alaw2ulaw(unsigned char aval) | ||
43 | { | ||
44 | aval &= 0xff; | ||
45 | return ((aval & 0x80) ? (0xFF ^ _a2u[aval ^ 0xD5]) : | ||
46 | @@ -279,8 +274,7 @@ | ||
47 | |||
48 | /* u-law to A-law conversion */ | ||
49 | static unsigned char | ||
50 | -ulaw2alaw(uval) | ||
51 | - unsigned char uval; | ||
52 | +ulaw2alaw(unsigned char uval) | ||
53 | { | ||
54 | uval &= 0xff; | ||
55 | return ((uval & 0x80) ? (0xD5 ^ (_u2a[0xFF ^ uval] - 1)) : | ||
diff --git a/meta-oe/recipes-multimedia/audiofile/audiofile_0.2.6.bb b/meta-oe/recipes-multimedia/audiofile/audiofile_0.2.6.bb new file mode 100644 index 000000000..ed273c80e --- /dev/null +++ b/meta-oe/recipes-multimedia/audiofile/audiofile_0.2.6.bb | |||
@@ -0,0 +1,20 @@ | |||
1 | DESCRIPTION = "The Audio File Library provides a uniform and elegant \ | ||
2 | API for accessing a variety of audio file formats, such as AIFF/AIFF-C, \ | ||
3 | WAVE, NeXT/Sun .snd/.au, Berkeley/IRCAM/CARL Sound File, Audio Visual \ | ||
4 | Research, Amiga IFF/8SVX, and NIST SPHERE." | ||
5 | SECTION = "libs" | ||
6 | LICENSE = "LGPLv2 && GPLv2" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \ | ||
8 | file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3" | ||
9 | |||
10 | SRC_URI = "http://www.68k.org/~michael/audiofile/audiofile-${PV}.tar.gz \ | ||
11 | file://audiofile-m4_quote_fix.diff;striplevel=0 \ | ||
12 | file://audiofile-oldstyle.patch;striplevel=0 \ | ||
13 | file://audiofile-0.2.6.patch;striplevel=0 \ | ||
14 | file://CVE-2008-5824.patch \ | ||
15 | " | ||
16 | |||
17 | inherit autotools lib_package binconfig | ||
18 | |||
19 | SRC_URI[md5sum] = "9c1049876cd51c0f1b12c2886cce4d42" | ||
20 | SRC_URI[sha256sum] = "4b6167b56e21556fb07c9ef06962fe32817064c62181ba47afd3322e0d0f22a9" | ||