update from 1.4.0 to 1.4.2

This commit is contained in:
caodongxia 2021-02-05 14:07:34 +08:00
parent 4ab9815572
commit 25b950da00
12 changed files with 38 additions and 72689 deletions

View File

@ -1,42 +0,0 @@
From af4a9502aa73c358f331ecc038e1e11375898a32 Mon Sep 17 00:00:00 2001
Date: Mon, 11 Jan 2021 11:51:23 +0800
Subject: [PATCH] fix CVE-2014-9640
diff --git a/oggenc/oggenc.c b/oggenc/oggenc.c
index 323dedb..4616506 100644
--- a/oggenc/oggenc.c
+++ b/oggenc/oggenc.c
@@ -97,6 +97,8 @@ int main(int argc, char **argv)
.3,-1,
0,0,0.f,
0, 0, 0, 0, 0};
+ input_format raw_format = {NULL, 0, raw_open, wav_close, "raw",
+ N_("RAW file reader")};
int i;
@@ -239,8 +241,6 @@ int main(int argc, char **argv)
if(opt.rawmode)
{
- static input_format raw_format = {NULL, 0, raw_open, wav_close, "raw",
- N_("RAW file reader")};
enc_opts.rate=opt.raw_samplerate;
enc_opts.channels=opt.raw_channels;
diff --git a/oggenc/skeleton.h b/oggenc/skeleton.h
index cf87dc2..50b070f 100644
--- a/oggenc/skeleton.h
+++ b/oggenc/skeleton.h
@@ -41,7 +41,7 @@ typedef struct {
ogg_int64_t granule_rate_d; /* granule rate denominator */
ogg_int64_t start_granule; /* start granule value */
ogg_uint32_t preroll; /* preroll */
- unsigned char granule_shift; // a 8-bit field /* 1 byte value holding the granule shift */
+ unsigned char granule_shift; /* 1 byte value holding the granule shift */
char *message_header_fields; /* holds all the message header fields */
/* current total size of the message header fields, for realloc purpose, initially zero */
ogg_uint32_t current_header_size;
--
2.23.0

View File

@ -1,84 +0,0 @@
From 32c4958c4d113562f879ce76664fe785f93bba7c Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Thu, 19 Feb 2015 15:32:24 +0100
Subject: [PATCH] oggenc: validate count of channels in the header
... in order to prevent a division by zero (CVE-2014-9638) and integer
overflow (CVE-2014-9639).
Bug: https://trac.xiph.org/ticket/2136
Bug: https://trac.xiph.org/ticket/2137
---
oggenc/audio.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/oggenc/audio.c b/oggenc/audio.c
index 22bbed4..1cbb214 100644
--- a/oggenc/audio.c
+++ b/oggenc/audio.c
@@ -13,6 +13,7 @@
#include <config.h>
#endif
+#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -251,6 +252,7 @@ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen)
aiff_fmt format;
aifffile *aiff = malloc(sizeof(aifffile));
int i;
+ long channels;
if(buf[11]=='C')
aifc=1;
@@ -277,11 +279,17 @@ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen)
return 0;
}
- format.channels = READ_U16_BE(buffer);
+ format.channels = channels = READ_U16_BE(buffer);
format.totalframes = READ_U32_BE(buffer+2);
format.samplesize = READ_U16_BE(buffer+6);
format.rate = (int)read_IEEE80(buffer+8);
+ if(channels <= 0L || SHRT_MAX < channels)
+ {
+ fprintf(stderr, _("Warning: Unsupported count of channels in AIFF header\n"));
+ return 0;
+ }
+
aiff->bigendian = 1;
if(aifc)
@@ -412,6 +420,7 @@ int wav_open(FILE *in, oe_enc_opt *opt, unsigned char *oldbuf, int buflen)
wav_fmt format;
wavfile *wav = malloc(sizeof(wavfile));
int i;
+ long channels;
/* Ok. At this point, we know we have a WAV file. Now we have to detect
* whether we support the subtype, and we have to find the actual data
@@ -449,12 +458,18 @@ int wav_open(FILE *in, oe_enc_opt *opt, unsigned char *oldbuf, int buflen)
}
format.format = READ_U16_LE(buf);
- format.channels = READ_U16_LE(buf+2);
+ format.channels = channels = READ_U16_LE(buf+2);
format.samplerate = READ_U32_LE(buf+4);
format.bytespersec = READ_U32_LE(buf+8);
format.align = READ_U16_LE(buf+12);
format.samplesize = READ_U16_LE(buf+14);
+ if(channels <= 0L || SHRT_MAX < channels)
+ {
+ fprintf(stderr, _("Warning: Unsupported count of channels in WAV header\n"));
+ return 0;
+ }
+
if(format.format == -2) /* WAVE_FORMAT_EXTENSIBLE */
{
if(len<40)
--
2.1.0

View File

@ -1,43 +0,0 @@
From 16d10a1c957425a49cf74332b99cf3d39e80cc09 Mon Sep 17 00:00:00 2001
From: Mark Harris <mark.hsj@gmail.com>
Date: Sun, 30 Aug 2015 05:54:46 -0700
Subject: [PATCH] oggenc: Fix large alloca on bad AIFF input
Fixes #2212
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
---
oggenc/audio.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/oggenc/audio.c b/oggenc/audio.c
index 1cbb214..547e826 100644
--- a/oggenc/audio.c
+++ b/oggenc/audio.c
@@ -246,8 +246,8 @@ static int aiff_permute_matrix[6][6] =
int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen)
{
int aifc; /* AIFC or AIFF? */
- unsigned int len;
- unsigned char *buffer;
+ unsigned int len, readlen;
+ unsigned char buffer[22];
unsigned char buf2[8];
aiff_fmt format;
aifffile *aiff = malloc(sizeof(aifffile));
@@ -271,9 +271,9 @@ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen)
return 0; /* Weird common chunk */
}
- buffer = alloca(len);
-
- if(fread(buffer,1,len,in) < len)
+ readlen = len < sizeof(buffer) ? len : sizeof(buffer);
+ if(fread(buffer,1,readlen,in) < readlen ||
+ (len > readlen && !seek_forward(in, len-readlen)))
{
fprintf(stderr, _("Warning: Unexpected EOF in reading AIFF header\n"));
return 0;
--
2.4.6

View File

@ -1,26 +0,0 @@
From 1fbd20941836aa4df17d0f6b44fef4d655ff5fc2 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Tue, 3 Sep 2013 12:28:32 +0200
Subject: [PATCH] vcut: fix an off-by-one error in submit_headers_to_stream()
Bug: https://bugzilla.redhat.com/1003607
---
vcut/vcut.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/vcut/vcut.c b/vcut/vcut.c
index d7ba699..17426b9 100644
--- a/vcut/vcut.c
+++ b/vcut/vcut.c
@@ -178,7 +178,7 @@ static int submit_headers_to_stream(vcut_state *s)
for(i=0;i<4;i++)
{
ogg_packet p;
- if(i < 4) /* a header packet */
+ if(i < 3) /* a header packet */
{
p.bytes = vs->headers[i].length;
p.packet = vs->headers[i].packet;
--
1.7.1

File diff suppressed because it is too large Load Diff

View File

@ -1,31 +0,0 @@
From c0a0dbfa58bf13cbd2a637288bf93619a7007673 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Mon, 26 Jan 2015 12:33:19 +0100
Subject: [PATCH] oggenc: do not use stack variable out of its scope of
validity
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Reported-by: Thomas Köller
Bug: https://bugzilla.redhat.com/1185558
---
oggenc/oggenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/oggenc/oggenc.c b/oggenc/oggenc.c
index ea105b2..759a3ee 100644
--- a/oggenc/oggenc.c
+++ b/oggenc/oggenc.c
@@ -239,7 +239,7 @@ int main(int argc, char **argv)
if(opt.rawmode)
{
- input_format raw_format = {NULL, 0, raw_open, wav_close, "raw",
+ static input_format raw_format = {NULL, 0, raw_open, wav_close, "raw",
N_("RAW file reader")};
enc_opts.rate=opt.raw_samplerate;
--
2.1.0

View File

@ -1,27 +0,0 @@
From 43120cc36c08dcfba0c9ff22354da2f3029c3f70 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Mon, 17 Dec 2012 12:50:36 +0100
Subject: [PATCH] vorbiscomment.1: fix URL to format documentation
Reported By: Samuel Sieb
Bug: https://bugzilla.redhat.com/887540
---
vorbiscomment/vorbiscomment.1 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/vorbiscomment/vorbiscomment.1 b/vorbiscomment/vorbiscomment.1
index a47bb12..0108e78 100644
--- a/vorbiscomment/vorbiscomment.1
+++ b/vorbiscomment/vorbiscomment.1
@@ -87,7 +87,7 @@ To add a set of comments from the standard input:
.SH TAG FORMAT
-See http://xiph.org/ogg/vorbis/doc/v-comment.html for documentation on the Ogg Vorbis tag format, including a suggested list of canonical tag names.
+See http://xiph.org/vorbis/doc/v-comment.html for documentation on the Ogg Vorbis tag format, including a suggested list of canonical tag names.
.SH AUTHORS
--
1.7.1

View File

@ -1,217 +0,0 @@
From b3a6187e1843e55c47b6e55d11e01399ab3894a0 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Tue, 28 May 2013 13:44:02 +0200
Subject: [PATCH 1/6] Remove the --quiet (-q) option from vorbiscomment.1 man page.
---
vorbiscomment/vorbiscomment.1 | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/vorbiscomment/vorbiscomment.1 b/vorbiscomment/vorbiscomment.1
index 0108e78..2bceb83 100644
--- a/vorbiscomment/vorbiscomment.1
+++ b/vorbiscomment/vorbiscomment.1
@@ -39,13 +39,11 @@ Reads, modifies, and appends Ogg Vorbis audio file metadata tags.
.IP "-a, --append"
Append comments.
.IP "-c file, --commentfile file"
-Take comments from a file. The file is the same format as is output by the the -l option or given to the -t option: one element per line in 'tag=value' format. If the file is /dev/null and -w was passed, the existing comments will be removed.
+Take comments from a file. The file is the same format as is output by the -l option or given to the -t option: one element per line in 'tag=value' format. If the file is /dev/null and -w was passed, the existing comments will be removed.
.IP "-h, --help"
Show command help.
.IP "-l, --list"
List the comments in the Ogg Vorbis file.
-.IP "-q, --quiet"
-Quiet mode. No messages are displayed.
.IP "-t 'name=value', --tag 'name=value'"
Specify a new tag on the command line. Each tag is given as a single string. The part before the '=' is treated as the tag name and the part after as the value.
.IP "-w, --write"
--
1.7.1
From 78ade241f35c6e4119e40ad879748a6d6a1a1821 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Tue, 28 May 2013 13:46:31 +0200
Subject: [PATCH 2/6] Mention the -V option in ogginfo.1 man page.
---
ogginfo/ogginfo.1 | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/ogginfo/ogginfo.1 b/ogginfo/ogginfo.1
index 126da20..bde5490 100644
--- a/ogginfo/ogginfo.1
+++ b/ogginfo/ogginfo.1
@@ -49,6 +49,8 @@ Quiet mode. This may be specified multiple times. Doing so once will remove
the detailed informative messages, twice will remove warnings as well.
.IP -v
Verbose mode. At the current time, this does not do anything.
+.IP -V
+Output version information and exit.
.SH AUTHORS
.br
--
1.7.1
From fa810af21f475cf073891088d40bbaf952fd1e28 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Tue, 28 May 2013 13:48:06 +0200
Subject: [PATCH 3/6] Fix typos in oggdec.1 man page.
---
oggdec/oggdec.1 | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/oggdec/oggdec.1 b/oggdec/oggdec.1
index fb12b18..1035cb6 100644
--- a/oggdec/oggdec.1
+++ b/oggdec/oggdec.1
@@ -6,7 +6,7 @@ oggdec - simple decoder, Ogg Vorbis file to PCM audio file (Wave or RAW).
.SH "SYNOPSIS"
.B oggdec
[
-.B -Qhv
+.B -QhV
] [
.B -b bits_per_sample
] [
@@ -48,7 +48,7 @@ Print help message.
Display version information.
.IP "-b n, --bits=n"
Bits per sample. Valid values are 8 or 16.
-.IP "-e n, --endian=n"
+.IP "-e n, --endianness=n"
Set endianness for 16-bit output. 0 (default) is little-endian (Intel byte order). 1 is big-endian (sane byte order).
.IP "-R, --raw"
Output in raw format. If not specified, writes Wave file (RIFF headers).
--
1.7.1
From 8c8d416cc17cb07dac72ad71d3ef0cc5e09c3bd3 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Tue, 28 May 2013 14:00:07 +0200
Subject: [PATCH 4/6] Document the --scale option of oggenc.
---
oggenc/man/oggenc.1 | 5 +++++
oggenc/oggenc.c | 1 +
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/oggenc/man/oggenc.1 b/oggenc/man/oggenc.1
index 411e2a9..633e5ec 100755
--- a/oggenc/man/oggenc.1
+++ b/oggenc/man/oggenc.1
@@ -47,6 +47,9 @@ oggenc \- encode audio into the Ogg Vorbis format
.B --downmix
]
[
+.B --scale
+]
+[
.B -s
.I serial
]
@@ -164,6 +167,8 @@ useful for downsampling for lower-bitrate encoding.
.IP "--downmix"
Downmix input from stereo to mono (has no effect on non-stereo streams). Useful
for lower-bitrate encoding.
+.IP "--scale"
+Input scaling factor (helps with clipping inputs).
.IP "--advanced-encode-option optionname=value"
Sets an advanced option. See the Advanced Options section for details.
.IP "-s, --serial"
diff --git a/oggenc/oggenc.c b/oggenc/oggenc.c
index 9c3e9cd..ea105b2 100644
--- a/oggenc/oggenc.c
+++ b/oggenc/oggenc.c
@@ -513,6 +513,7 @@ static void usage(void)
" --resample n Resample input data to sampling rate n (Hz)\n"
" --downmix Downmix stereo to mono. Only allowed on stereo\n"
" input.\n"
+ " --scale Input scaling factor (helps with clipping inputs).\n"
" -s, --serial Specify a serial number for the stream. If encoding\n"
" multiple files, this will be incremented for each\n"
" stream after the first.\n"));
--
1.7.1
From 3dcdecdcb520150b53a7e3e7d346e23a49f4018a Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Tue, 28 May 2013 14:05:22 +0200
Subject: [PATCH 5/6] Document --remote and -delay in ogg123.1 man page.
---
ogg123/ogg123.1 | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/ogg123/ogg123.1 b/ogg123/ogg123.1
index 160a876..935cab6 100644
--- a/ogg123/ogg123.1
+++ b/ogg123/ogg123.1
@@ -73,6 +73,10 @@ Specify output file for file devices. The filename "-" writes to standard
out. If the file already exists,
.B ogg123
will overwrite it.
+.IP "-l s, --delay s"
+Set termination timeout in milliseconds. ogg123 will skip to the next song on
+SIGINT (Ctrl-C), and will terminate if two SIGINTs are received within the
+specified timeout 's'. (default 500)
.IP "-h, --help"
Show command help.
.IP "-k n, --skip n"
@@ -106,6 +110,8 @@ times slower than normal speed. May be with -x for interesting fractional
speeds.
.IP "-r, --repeat"
Repeat playlist indefinitely.
+.IP "-R, --remote"
+Use remote control interface.
.IP "-z, --shuffle"
Play files in pseudo-random order.
.IP "-Z, --random"
--
1.7.1
From ecd9cd8d881fadbb24bc948980bb6125f7b2c710 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Tue, 28 May 2013 14:14:32 +0200
Subject: [PATCH 6/6] Document the --config (-c) option of ogg123.
---
ogg123/cmdline_options.c | 1 +
ogg123/ogg123.1 | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/ogg123/cmdline_options.c b/ogg123/cmdline_options.c
index d663cc6..8abf4c5 100644
--- a/ogg123/cmdline_options.c
+++ b/ogg123/cmdline_options.c
@@ -373,6 +373,7 @@ void cmdline_usage (void)
printf ("\n");
printf (_("Miscellaneous options\n"));
+ printf (_(" -c c, --config c Config options from command-line.\n"));
printf (_(" -l s, --delay s Set termination timeout in milliseconds. ogg123\n"
" will skip to the next song on SIGINT (Ctrl-C),\n"
" and will terminate if two SIGINTs are received\n"
diff --git a/ogg123/ogg123.1 b/ogg123/ogg123.1
index 935cab6..1b419f7 100644
--- a/ogg123/ogg123.1
+++ b/ogg123/ogg123.1
@@ -73,6 +73,8 @@ Specify output file for file devices. The filename "-" writes to standard
out. If the file already exists,
.B ogg123
will overwrite it.
+.IP "-c c, --config c"
+Config options from command-line.
.IP "-l s, --delay s"
Set termination timeout in milliseconds. ogg123 will skip to the next song on
SIGINT (Ctrl-C), and will terminate if two SIGINTs are received within the
--
1.7.1

Binary file not shown.

View File

@ -0,0 +1,31 @@
From af639948fc037f837eeadaf496c43480f71aa3fb Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Tue, 28 May 2013 13:44:02 +0200
Subject: [PATCH] Remove the --quiet (-q) option from vorbiscomment.1 man page.
---
vorbiscomment/vorbiscomment.1 | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/vorbiscomment/vorbiscomment.1 b/vorbiscomment/vorbiscomment.1
index 0211b46..3cc1736 100644
--- a/vorbiscomment/vorbiscomment.1
+++ b/vorbiscomment/vorbiscomment.1
@@ -39,13 +39,11 @@ Reads, modifies, and appends Ogg Vorbis audio file metadata tags.
.IP "-a, --append"
Updates comments.
.IP "-c file, --commentfile file"
-Take comments from a file. The file is the same format as is output by the the -l option or given to the -t option: one element per line in 'tag=value' format. If the file is /dev/null and -w was passed, the existing comments will be removed.
+Take comments from a file. The file is the same format as is output by the -l option or given to the -t option: one element per line in 'tag=value' format. If the file is /dev/null and -w was passed, the existing comments will be removed.
.IP "-h, --help"
Show command help.
.IP "-l, --list"
List the comments in the Ogg Vorbis file.
-.IP "-q, --quiet"
-Quiet mode. No messages are displayed.
.IP "-t 'name=value', --tag 'name=value'"
Specify a new tag on the command line. Each tag is given as a single string. The part before the '=' is treated as the tag name and the part after as the value.
.IP "-d 'name[=value]', --rm 'name[=value]'"
--
2.26.2

BIN
vorbis-tools-1.4.2.tar.gz Normal file

Binary file not shown.

View File

@ -1,20 +1,12 @@
Name: vorbis-tools
Summary: Several Ogg Vorbis Tools
Version: 1.4.0
Release: 31
Version: 1.4.2
Release: 1
Epoch: 1
License: GPLv2
URL: http://www.xiph.org/
Source: http://downloads.xiph.org/releases/vorbis/%{name}-%{version}.tar.gz
Patch0: vorbis-tools-1.4.0-bz887540.patch
Patch1: vorbis-tools-1.4.0-man-page.patch
Patch2: vorbis-tools-1.4.0-bz1003607.patch
Patch3: vorbis-tools-1.4.0-bz1116650.patch
Patch4: vorbis-tools-1.4.0-bz1185558.patch
Patch5: vorbis-tools-1.4.0-CVE-2014-9638-CVE-2014-9639.patch
Patch6: vorbis-tools-1.4.0-CVE-2015-6749.patch
Patch7: CVE-2014-9640.patch
Patch1: vorbis-tools-1.4.2-man-page.patch
BuildRequires: flac-devel gettext gcc libao-devel libcurl-devel libvorbis-devel speex-devel
@ -55,6 +47,9 @@ export CFLAGS="$RPM_OPT_FLAGS -Wno-error=format-security"
%exclude %{_docdir}/%{name}*
%changelog
* Sat Jan 30 2021 caodongxia <caodongxia@huawei.com> - 1:1.4.2-1
- Update to 1.4.2
* Mon Jan 11 2021 wangyue<wangyue92@huawei.com> - 1:1.4.0-31
- fix CVE-2014-9640