audio/vorbis-tools: update to 1.4.2
This release fixes many bugs. Additional user-visible changes: * ogg123: Added support for Opus files * ogginfo: Added support for Opus, FLAC, and speex * ogg123, ogginfo: Added support to decode METADATA_BLOCK_PICTURE * ogginfo: Added support for decoding Skeleton * vorbiscomment: Added -d/--rm to allow removal of tags
This commit is contained in:
parent
74d3eecb62
commit
85d7b07531
@ -1,35 +1,37 @@
|
||||
# $OpenBSD: Makefile,v 1.55 2019/07/12 20:43:42 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.56 2021/01/23 22:13:14 naddy Exp $
|
||||
|
||||
COMMENT= play, encode, and manage Ogg Vorbis files
|
||||
|
||||
DISTNAME= vorbis-tools-1.4.0
|
||||
REVISION= 6
|
||||
DISTNAME= vorbis-tools-1.4.2
|
||||
CATEGORIES= audio
|
||||
HOMEPAGE= https://www.xiph.org/vorbis/
|
||||
HOMEPAGE= https://xiph.org/vorbis/
|
||||
|
||||
MAINTAINER= Christian Weisgerber <naddy@openbsd.org>
|
||||
|
||||
# GPLv2
|
||||
PERMIT_PACKAGE= Yes
|
||||
|
||||
WANTLIB+= FLAC ao c crypto curl iconv intl m nghttp2 ogg pthread speex
|
||||
WANTLIB+= ssl vorbis vorbisenc vorbisfile z
|
||||
|
||||
MASTER_SITES= https://downloads.xiph.org/releases/vorbis/
|
||||
|
||||
LIB_DEPENDS= audio/flac \
|
||||
audio/libao \
|
||||
audio/libvorbis \
|
||||
audio/opusfile \
|
||||
audio/speex \
|
||||
devel/gettext,-runtime \
|
||||
net/curl
|
||||
|
||||
WANTLIB= FLAC ao c crypto curl iconv intl m nghttp2 ogg opus opusfile \
|
||||
pthread speex ssl vorbis vorbisenc vorbisfile z
|
||||
|
||||
CONFIGURE_STYLE=gnu
|
||||
CONFIGURE_ARGS= --without-kate
|
||||
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
|
||||
LDFLAGS="-L${LOCALBASE}/lib"
|
||||
SEPARATE_BUILD= Yes
|
||||
|
||||
DEBUG_PACKAGES= ${BUILD_PACKAGES}
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/vorbis-tools
|
||||
${INSTALL_DATA} ${WRKSRC}/ogg123/ogg123rc-example \
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (vorbis-tools-1.4.0.tar.gz) = o4k5W6pD+OWnlsmdr2I5fkNafnNTHJ9E2QhAVaBdIrw=
|
||||
SIZE (vorbis-tools-1.4.0.tar.gz) = 1346532
|
||||
SHA256 (vorbis-tools-1.4.2.tar.gz) = 23d07CvyyTmxOUUhg2ab6E/aV3TWQA/Ff94393Yk8LA=
|
||||
SIZE (vorbis-tools-1.4.2.tar.gz) = 1389947
|
||||
|
@ -1,7 +1,8 @@
|
||||
$OpenBSD: patch-configure,v 1.8 2010/06/03 15:50:28 naddy Exp $
|
||||
--- configure.orig Fri Mar 26 08:07:20 2010
|
||||
+++ configure Sun May 23 19:06:44 2010
|
||||
@@ -20398,7 +20398,7 @@ if test -z "$GCC"; then
|
||||
$OpenBSD: patch-configure,v 1.9 2021/01/23 22:13:14 naddy Exp $
|
||||
Index: configure
|
||||
--- configure.orig
|
||||
+++ configure
|
||||
@@ -18084,7 +18084,7 @@ if test -z "$GCC"; then
|
||||
;;
|
||||
*)
|
||||
DEBUG="-g"
|
||||
@ -10,7 +11,7 @@ $OpenBSD: patch-configure,v 1.8 2010/06/03 15:50:28 naddy Exp $
|
||||
PROFILE="-g -p"
|
||||
;;
|
||||
esac
|
||||
@@ -20421,8 +20421,8 @@ else
|
||||
@@ -18107,8 +18107,8 @@ else
|
||||
;;
|
||||
*)
|
||||
DEBUG="-g -Wall -fsigned-char"
|
||||
|
@ -1,12 +1,13 @@
|
||||
$OpenBSD: patch-ogg123_Makefile_in,v 1.10 2010/06/03 15:50:28 naddy Exp $
|
||||
--- ogg123/Makefile.in.orig Fri Mar 26 08:07:18 2010
|
||||
+++ ogg123/Makefile.in Sun May 23 19:06:44 2010
|
||||
@@ -633,7 +633,7 @@ info: info-am
|
||||
$OpenBSD: patch-ogg123_Makefile_in,v 1.11 2021/01/23 22:13:14 naddy Exp $
|
||||
Index: ogg123/Makefile.in
|
||||
--- ogg123/Makefile.in.orig
|
||||
+++ ogg123/Makefile.in
|
||||
@@ -816,7 +816,7 @@ info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
-install-data-am: install-docDATA install-man
|
||||
+install-data-am: install-man
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
|
@ -1,11 +1,12 @@
|
||||
$OpenBSD: patch-ogg123_ogg123_c,v 1.3 2012/05/15 19:51:53 naddy Exp $
|
||||
$OpenBSD: patch-ogg123_ogg123_c,v 1.4 2021/01/23 22:13:14 naddy Exp $
|
||||
|
||||
The underlying mutex is actually guaranteed to be unlocked when we
|
||||
reach this point. Do not try to unlock it again.
|
||||
|
||||
--- ogg123/ogg123.c.orig Mon May 14 16:33:30 2012
|
||||
+++ ogg123/ogg123.c Tue May 15 21:40:42 2012
|
||||
@@ -743,7 +743,6 @@ void play (char *source_string)
|
||||
Index: ogg123/ogg123.c
|
||||
--- ogg123/ogg123.c.orig
|
||||
+++ ogg123/ogg123.c
|
||||
@@ -742,7 +742,6 @@ void play (const char *source_string)
|
||||
|
||||
format->cleanup(decoder);
|
||||
transport->close(source);
|
||||
|
@ -1,9 +1,11 @@
|
||||
$OpenBSD: patch-ogg123_vorbis_comments_c,v 1.2 2021/01/23 22:13:14 naddy Exp $
|
||||
|
||||
strcspn(3) does not work this way, fix SIGSEGV on unknown comments
|
||||
|
||||
$OpenBSD: patch-ogg123_vorbis_comments_c,v 1.1 2009/07/17 08:20:37 weerd Exp $
|
||||
--- ogg123/vorbis_comments.c.orig Wed Jul 8 18:44:47 2009
|
||||
+++ ogg123/vorbis_comments.c Wed Jul 8 18:45:13 2009
|
||||
@@ -72,7 +72,7 @@ char *lookup_comment_prettyprint (char *comment, int *
|
||||
Index: ogg123/vorbis_comments.c
|
||||
--- ogg123/vorbis_comments.c.orig
|
||||
+++ ogg123/vorbis_comments.c
|
||||
@@ -74,7 +74,7 @@ char *lookup_comment_prettyprint (const char *comment,
|
||||
|
||||
/* Use default formatting */
|
||||
j = strcspn(comment, "=");
|
||||
|
@ -1,92 +0,0 @@
|
||||
$OpenBSD: patch-oggenc_audio_c,v 1.3 2015/09/10 21:03:12 naddy Exp $
|
||||
|
||||
CVE-2015-6749 (aiff_open buffer overflow)
|
||||
https://trac.xiph.org/attachment/ticket/2212/0001-oggenc-Fix-large-alloca-on-bad-AIFF-input.patch
|
||||
|
||||
CVE-2014-9638 (division by zero)
|
||||
CVE-2014-9639 (channel integer overflow)
|
||||
http://pkgs.fedoraproject.org/cgit/vorbis-tools.git/tree/vorbis-tools-1.4.0-CVE-2014-9638-CVE-2014-9639.patch
|
||||
|
||||
--- oggenc/audio.c.orig Wed Mar 24 09:27:14 2010
|
||||
+++ oggenc/audio.c Thu Sep 10 22:48:38 2015
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
+#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -245,12 +246,13 @@ 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));
|
||||
int i;
|
||||
+ long channels;
|
||||
|
||||
if(buf[11]=='C')
|
||||
aifc=1;
|
||||
@@ -269,19 +271,25 @@ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char
|
||||
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;
|
||||
}
|
||||
|
||||
- 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
|
||||
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,11 +458,17 @@ int wav_open(FILE *in, oe_enc_opt *opt, unsigned char
|
||||
}
|
||||
|
||||
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 */
|
||||
{
|
@ -1,26 +0,0 @@
|
||||
$OpenBSD: patch-oggenc_oggenc_c,v 1.1 2015/09/10 21:03:12 naddy Exp $
|
||||
|
||||
Fix crash on raw file close.
|
||||
https://trac.xiph.org/changeset/19117
|
||||
|
||||
--- oggenc/oggenc.c.orig Fri Mar 26 08:07:07 2010
|
||||
+++ oggenc/oggenc.c Thu Sep 10 22:48:38 2015
|
||||
@@ -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,9 +241,6 @@ int main(int argc, char **argv)
|
||||
|
||||
if(opt.rawmode)
|
||||
{
|
||||
- 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;
|
||||
enc_opts.samplesize=opt.raw_samplesize;
|
13
audio/vorbis-tools/patches/patch-ogginfo_codec_skeleton_c
Normal file
13
audio/vorbis-tools/patches/patch-ogginfo_codec_skeleton_c
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-ogginfo_codec_skeleton_c,v 1.1 2021/01/23 22:13:14 naddy Exp $
|
||||
|
||||
Index: ogginfo/codec_skeleton.c
|
||||
--- ogginfo/codec_skeleton.c.orig
|
||||
+++ ogginfo/codec_skeleton.c
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <ogg/ogg.h>
|
||||
|
||||
+#include "utf8.h"
|
||||
#include "i18n.h"
|
||||
|
||||
#include "private.h"
|
Loading…
x
Reference in New Issue
Block a user