diff options
author | Edinaldo P. Silva <edps.mundognu@gmail.com> | 2015-11-26 08:43:58 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2015-11-28 07:25:59 +0700 |
commit | 6fc1d550577fb7f9aadb17e45c0f33676fd7aaaa (patch) | |
tree | 953b641e03b9b1e558996974fa23c2295cbaf700 /audio/flake | |
parent | 0fabf487392e35eb4ec58ed3ac4d7e5217c7e9a1 (diff) | |
download | slackbuilds-6fc1d550577fb7f9aadb17e45c0f33676fd7aaaa.tar.gz |
audio/flake: Fix buffer overrun.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'audio/flake')
-rw-r--r-- | audio/flake/1001-buffer_overrun.patch | 18 | ||||
-rw-r--r-- | audio/flake/README | 27 | ||||
-rw-r--r-- | audio/flake/flake.1 | 39 | ||||
-rw-r--r-- | audio/flake/flake.SlackBuild | 11 | ||||
-rw-r--r-- | audio/flake/slack-desc | 8 |
5 files changed, 87 insertions, 16 deletions
diff --git a/audio/flake/1001-buffer_overrun.patch b/audio/flake/1001-buffer_overrun.patch new file mode 100644 index 0000000000..d26bee3196 --- /dev/null +++ b/audio/flake/1001-buffer_overrun.patch @@ -0,0 +1,18 @@ +Description: Pass max_order instead of max_order+1 to compute_lpc_coefs(). + This avoids a buffer overrun in the autoc[] array. +Origin: upstream, commit:263 +--- + libflake/lpc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- flake.orig/libflake/lpc.c ++++ flake/libflake/lpc.c +@@ -232,7 +232,7 @@ lpc_calc_coefs(const int32_t *samples, i + int i; + int opt_order; + +- compute_autocorr(samples, blocksize, max_order+1, autoc); ++ compute_autocorr(samples, blocksize, max_order, autoc); + + opt_order = max_order; + if(omethod == FLAKE_ORDER_METHOD_EST) { diff --git a/audio/flake/README b/audio/flake/README index 966df8d1d6..87562f5f6e 100644 --- a/audio/flake/README +++ b/audio/flake/README @@ -1,16 +1,21 @@ flake (open-souce FLAC audio encoder) -Flake is an open-souce FLAC audio encoder. -It was developed as an independent implementation of the FLAC specification, -and is meant to be an alternative to the FLAC reference encoder. -While Flake does not yet have many of the advanced features of the reference encoder, it does have the benefit of faster encoding. +Flake is an open-souce FLAC audio encoder. It was developed as an +independent implementation of the FLAC specification, and is meant +to be an alternative to the FLAC reference encoder. + +While Flake does not yet have many of the advanced features of the +reference encoder, it does have the benefit of faster encoding. Features: -* Commandline encoder frontend -* libflake library which can be used by other programs -* Fast encoding -* Compression modes which closely mirror the reference encoder, plus additional modes for higher compression -* A variety of LPC order search methods, each of which has its own speed vs. compression tradeoff -* Variable block size encoding: an experimental feature which is allowed as part of the specification, - but is not currently implemented in the reference encoder. + * Commandline encoder frontend + * libflake library which can be used by other programs + * Fast encoding + * Compression modes which closely mirror the reference encoder, +plus additional modes for higher compression + * A variety of LPC order search methods, each of which has its +own speed vs. compression tradeoff + * Variable block size encoding: an experimental feature which +is allowed as part of the specification, but is not currently +implemented in the reference encoder. diff --git a/audio/flake/flake.1 b/audio/flake/flake.1 new file mode 100644 index 0000000000..471f67ae9f --- /dev/null +++ b/audio/flake/flake.1 @@ -0,0 +1,39 @@ +.TH "FLAKE" "1" "2007-05-20" "Thomas Perl" "" +.SH "NAME" +flake \- Alternative Free Lossless Audio Codec encoder +.SH "SYNOPSIS" +.B flake +.RI [options] +[input.wav] +[output.flac] +.SH "DESCRIPTION" +\fBflake\fP is an alternative encoder for the Free Lossless Audio Codec. Most tests turn out very similar or slightly better compression than the FLAC reference encoder, and it generally encodes significantly faster. Decoding times of the generated files are also close to those made by the reference encoder. +.SH "OPTIONS" +.TP +.B \-h +Print out list of commandline options +.TP +.B \-p # +Padding bytes to put in header (default: 4096) +.TP +.B \-0..\-12 +Compression level (default: 5) +.TP +.B \-b # +Block size [16 \- 65535] (default: 4608) +.TP +.B \-l # +Maximum prediction order [0 \- 32] (default: 8) +.TP +.B \-o # +Prediction order selection method (0 = maximum, 1 = estimate (default), 2 = 2\-level, 3 = 4\-level, 4 = 8\-level, 5 = full search) +.TP +.B \-s # +Stereo decorrelation method (0 = independent L+R channels, 1 = mid\-side (default)) +.SH "SEE ALSO" +.BR flac (1) +.SH "AUTHOR" +flake was written by Justin Ruggles <justin.ruggles@gmail.com>. +.PP +This manual page was written by Thomas Perl <thp@perli.net>, +for the Debian project (but may be used by others). diff --git a/audio/flake/flake.SlackBuild b/audio/flake/flake.SlackBuild index fcd7a257b2..b675b9f05a 100644 --- a/audio/flake/flake.SlackBuild +++ b/audio/flake/flake.SlackBuild @@ -24,7 +24,7 @@ PRGNAM=flake VERSION=${VERSION:-0.11} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -69,6 +69,8 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +patch -p1 < $CWD/1001-buffer_overrun.patch + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -81,7 +83,14 @@ make install DESTDIR=$PKG find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +mkdir -p $PKG/usr/man/man1 +cp -a $CWD/flake.1 $PKG/usr/man/man1 + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + DOCS="Changelog COPYING README" + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM-SlackBuild diff --git a/audio/flake/slack-desc b/audio/flake/slack-desc index 295b4c00d8..fb29fd2467 100644 --- a/audio/flake/slack-desc +++ b/audio/flake/slack-desc @@ -8,12 +8,12 @@ |-----handy-ruler------------------------------------------------------| flake: flake (open-souce FLAC audio encoder) flake: -flake: Flake is an open-souce FLAC audio encoder. -flake: It was developed as an independent -flake: implementation of the FLAC specification, and is meant to be an -flake: alternative to the FLAC reference encoder. +flake: Flake is an open-souce FLAC audio encoder. It was developed as an +flake: independent implementation of the FLAC specification, and is meant +flake: to be an alternative to the FLAC reference encoder. flake: flake: Home Page: http://flake-enc.sourceforge.net/ flake: flake: flake: +flake: |