# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= vorbis-tools VERSION= 1.4.0 KEYWORDS= audio VARIANTS= standard SDESC[standard]= Play, encode, and manage Ogg Vorbis files HOMEPAGE= https://xiph.org/vorbis/ CONTACT= Michael_Reim[kraileth@elderlinux.org] DOWNLOAD_GROUPS= main SITES[main]= https://ftp.osuosl.org/pub/xiph/releases/vorbis/ DISTFILE[1]= vorbis-tools-1.4.0.tar.gz:main DF_INDEX= 1 SPKGS[standard]= single OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none BUILDRUN_DEPENDS= curl:primary:standard flac:primary:standard libao:primary:standard libkate:primary:standard libvorbis:primary:standard speex:single:standard USES= gettext-runtime iconv pkgconfig LICENSE= GPLv2:single LICENSE_TERMS= single:{{WRKDIR}}/TERMS LICENSE_FILE= GPLv2:{{WRKSRC}}/COPYING LICENSE_AWK= TERMS:"^$$" LICENSE_SOURCE= TERMS:{{WRKSRC}}/oggdec/oggdec.c LICENSE_SCHEME= solo FPC_EQUIVALENT= audio/vorbis-tools MUST_CONFIGURE= gnu CONFIGURE_ENV= PTHREAD_LIBS="-lpthread" VAR_OPSYS[sunos]= LDFLAGS=-lrt post-install: ${MKDIR} ${STAGEDIR}${PREFIX}/share/examples/vorbis-tools ${INSTALL_DATA} ${WRKSRC}/ogg123/ogg123rc-example \ ${STAGEDIR}${PREFIX}/share/examples/vorbis-tools/ogg123rc [FILE:555:descriptions/desc.single] Vorbis is a general-purpose audio and music encoding format contemporary to MPEG-4's AAC and TwinVQ, the next generation beyond MPEG audio layer 3. Unlike the MPEG sponsored formats and other proprietary formats such as RealAudio G2, the Vorbis CODEC specification belongs to the public domain. All the technical details are published and documented, and any software entity may make full use of the format without royalty or patent concerns. This package contains utilities to encode, decode, and cut vorbis streams, and to add comments to them. [FILE:104:distinfo] a389395baa43f8e5a796c99daf62397e435a7e73531c9f44d9084055a05d22bc 1346532 vorbis-tools-1.4.0.tar.gz [FILE:947:manifests/plist.single] bin/ ogg123 oggdec oggenc ogginfo vcut vorbiscomment share/examples/vorbis-tools/ogg123rc share/locale/be/LC_MESSAGES/vorbis-tools.mo share/locale/cs/LC_MESSAGES/vorbis-tools.mo share/locale/da/LC_MESSAGES/vorbis-tools.mo share/locale/en_GB/LC_MESSAGES/vorbis-tools.mo share/locale/eo/LC_MESSAGES/vorbis-tools.mo share/locale/es/LC_MESSAGES/vorbis-tools.mo share/locale/fr/LC_MESSAGES/vorbis-tools.mo share/locale/hr/LC_MESSAGES/vorbis-tools.mo share/locale/hu/LC_MESSAGES/vorbis-tools.mo share/locale/nl/LC_MESSAGES/vorbis-tools.mo share/locale/pl/LC_MESSAGES/vorbis-tools.mo share/locale/ro/LC_MESSAGES/vorbis-tools.mo share/locale/ru/LC_MESSAGES/vorbis-tools.mo share/locale/sk/LC_MESSAGES/vorbis-tools.mo share/locale/sv/LC_MESSAGES/vorbis-tools.mo share/locale/uk/LC_MESSAGES/vorbis-tools.mo share/locale/vi/LC_MESSAGES/vorbis-tools.mo share/man/man1/ ogg123.1.gz oggdec.1.gz oggenc.1.gz ogginfo.1.gz vcut.1.gz vorbiscomment.1.gz [FILE:241:patches/patch-ogg123_Makefile.in] --- ogg123/Makefile.in.orig 2010-03-26 07:07:18 UTC +++ ogg123/Makefile.in @@ -633,7 +633,7 @@ info: info-am info-am: -install-data-am: install-docDATA install-man +install-data-am: install-man install-exec-am: install-binPROGRAMS [FILE:321:patches/patch-ogg123_vorbis__comments.c] --- ogg123/vorbis_comments.c.orig 2010-01-27 04:14:11 UTC +++ ogg123/vorbis_comments.c @@ -72,7 +72,7 @@ char *lookup_comment_prettyprint (char * /* Use default formatting */ j = strcspn(comment, "="); - if (j) { + if (j != strlen(comment)) { *offset = j + 1; s = malloc(j + 2); if (s == NULL) { [FILE:2550:patches/patch-oggenc_audio.c] --- oggenc/audio.c.orig 2010-03-24 08:27:14 UTC +++ oggenc/audio.c @@ -13,6 +13,7 @@ #include #endif +#include #include #include #include @@ -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, 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, 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, } 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) [FILE:202:patches/patch-oggenc_lyrics.c] --- oggenc/lyrics.c.orig 2010-01-22 06:28:06 UTC +++ oggenc/lyrics.c @@ -16,7 +16,7 @@ #endif #include -#include +#include #include #include [FILE:672:patches/patch-oggenc_oggenc.c] --- oggenc/oggenc.c.orig 2010-03-26 07:07:07 UTC +++ 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,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;