Date: Thu, 18 Jul 2013 17:47:53 +0000 (UTC) From: Christian Weisgerber <naddy@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r323248 - in head/audio/flac: . files Message-ID: <201307181747.r6IHlrTo010009@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: naddy Date: Thu Jul 18 17:47:53 2013 New Revision: 323248 URL: http://svnweb.freebsd.org/changeset/ports/323248 Log: Fix an arithmetic overflow in the RICE2 partitioner. For a specific 24 bit WAV file encoding with compression level 7 was generating a file a couple of orders of magnitude larger than the original. Obtained from: upstream Added: head/audio/flac/files/patch-src_libFLAC_stream__encoder.c (contents, props changed) Modified: head/audio/flac/Makefile Modified: head/audio/flac/Makefile ============================================================================== --- head/audio/flac/Makefile Thu Jul 18 17:29:09 2013 (r323247) +++ head/audio/flac/Makefile Thu Jul 18 17:47:53 2013 (r323248) @@ -3,6 +3,7 @@ PORTNAME= flac PORTVERSION= 1.3.0 +PORTREVISION= 1 CATEGORIES= audio MASTER_SITES= http://downloads.xiph.org/releases/flac/ @@ -20,7 +21,6 @@ CONFIGURE_ARGS= --enable-sse \ --disable-silent-rules \ --disable-thorough-tests \ --disable-xmms-plugin -MAKE_JOBS_SAFE= yes OPTIONS_DEFINE= DOCS ICONV OPTIONS_DEFAULT=ICONV Added: head/audio/flac/files/patch-src_libFLAC_stream__encoder.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/flac/files/patch-src_libFLAC_stream__encoder.c Thu Jul 18 17:47:53 2013 (r323248) @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- src/libFLAC/stream_encoder.c.orig ++++ src/libFLAC/stream_encoder.c +@@ -3784,7 +3784,7 @@ + /* slightly pessimistic but still catches all common cases */ + /* WATCHOUT: "+ bps" is an assumption that the average residual magnitude will not be more than "bps" bits */ + if(FLAC__bitmath_ilog2(default_partition_samples) + bps < 32) { +- FLAC__uint32 abs_residual_partition_sum; ++ FLAC__uint64 abs_residual_partition_sum; + + for(partition = residual_sample = 0; partition < partitions; partition++) { + end += default_partition_samples;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307181747.r6IHlrTo010009>