diff options
author | snj <snj> | 2015-02-27 19:49:16 +0000 |
---|---|---|
committer | snj <snj> | 2015-02-27 19:49:16 +0000 |
commit | f7e77dcb4029ddb282c3c18a7366cf90a3543d7c (patch) | |
tree | 681f879f642ffe84d562fe78f23ca62c2e39a7be /audio/lame | |
parent | 5b4b4d261c6de7396abcfbe047ab495ed06797e6 (diff) | |
download | pkgsrc-f7e77dcb4029ddb282c3c18a7366cf90a3543d7c.tar.gz |
add patches to fix some nasty crashes in lame. taken from
https://bugs.debian.org/777159 https://bugs.debian.org/778529
and https://bugs.debian.org/778703
Diffstat (limited to 'audio/lame')
-rw-r--r-- | audio/lame/Makefile | 4 | ||||
-rw-r--r-- | audio/lame/distinfo | 5 | ||||
-rw-r--r-- | audio/lame/patches/patch-frontend_get__audio.c | 17 | ||||
-rw-r--r-- | audio/lame/patches/patch-libmp3lame_lame.c | 19 | ||||
-rw-r--r-- | audio/lame/patches/patch-libmp3lame_util.c | 23 |
5 files changed, 65 insertions, 3 deletions
diff --git a/audio/lame/Makefile b/audio/lame/Makefile index 276369cd7db..431a9ed2d49 100644 --- a/audio/lame/Makefile +++ b/audio/lame/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.75 2014/10/09 14:05:56 wiz Exp $ +# $NetBSD: Makefile,v 1.76 2015/02/27 19:49:16 snj Exp $ DISTNAME= lame-3.99.5 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= audio MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=lame/} diff --git a/audio/lame/distinfo b/audio/lame/distinfo index dac6e03cc2f..035393cf030 100644 --- a/audio/lame/distinfo +++ b/audio/lame/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.24 2013/10/10 10:49:30 roy Exp $ +$NetBSD: distinfo,v 1.25 2015/02/27 19:49:16 snj Exp $ SHA1 (lame-3.99.5.tar.gz) = 03a0bfa85713adcc6b3383c12e2cc68a9cfbf4c4 RMD160 (lame-3.99.5.tar.gz) = 8a0990af918b635cc79eb27a3beafc6c0ee13a9f @@ -7,3 +7,6 @@ SHA1 (patch-ab) = e356b7614cfd4a2012f66926fe58a717dcc130f3 SHA1 (patch-ad) = fa14817f765a61f046a96a1b556e2c8203fc27ad SHA1 (patch-configure) = bc2243e364a2a6397cc0d09129969274b88f6b98 SHA1 (patch-configure.in) = 6ca01d610b94a402f2c2b351aa901a5072f3a0cb +SHA1 (patch-frontend_get__audio.c) = c6df7a003d07e916c5129d45322c708f09b524e8 +SHA1 (patch-libmp3lame_lame.c) = bdc403ff8a1a7d5a6082b4d214fd43df99b1344e +SHA1 (patch-libmp3lame_util.c) = b327113542f6ea7c9ec6af96a63635275335d364 diff --git a/audio/lame/patches/patch-frontend_get__audio.c b/audio/lame/patches/patch-frontend_get__audio.c new file mode 100644 index 00000000000..bebe4dfa54e --- /dev/null +++ b/audio/lame/patches/patch-frontend_get__audio.c @@ -0,0 +1,17 @@ +$NetBSD: patch-frontend_get__audio.c,v 1.1 2015/02/27 19:49:16 snj Exp $ + +https://bugs.debian.org/777159 + +--- frontend/get_audio.c.orig 2012-02-14 02:35:58.000000000 -0800 ++++ frontend/get_audio.c 2015-02-27 11:15:11.000000000 -0800 +@@ -1448,6 +1448,10 @@ parse_wave_header(lame_global_flags * gf + else { + (void) lame_set_in_samplerate(gfp, global_reader.input_samplerate); + } ++ /* avoid division by zero */ ++ if (bits_per_sample < 1) ++ return -1; ++ + global. pcmbitwidth = bits_per_sample; + global. pcm_is_unsigned_8bit = 1; + global. pcm_is_ieee_float = (format_tag == WAVE_FORMAT_IEEE_FLOAT ? 1 : 0); diff --git a/audio/lame/patches/patch-libmp3lame_lame.c b/audio/lame/patches/patch-libmp3lame_lame.c new file mode 100644 index 00000000000..2ed3d9c6299 --- /dev/null +++ b/audio/lame/patches/patch-libmp3lame_lame.c @@ -0,0 +1,19 @@ +$NetBSD: patch-libmp3lame_lame.c,v 1.1 2015/02/27 19:49:16 snj Exp $ + +https://bugs.debian.org/778703 + +--- libmp3lame/lame.c.orig 2011-10-18 14:51:20.000000000 -0700 ++++ libmp3lame/lame.c 2015-02-27 11:06:06.000000000 -0800 +@@ -822,6 +822,12 @@ lame_init_params(lame_global_flags * gfp + } + #endif + ++ if (gfp->samplerate_in < 0 || gfp->num_channels < 0) { ++ freegfc(gfc); ++ gfp->internal_flags = NULL; ++ return -1; ++ } ++ + cfg->disable_reservoir = gfp->disable_reservoir; + cfg->lowpassfreq = gfp->lowpassfreq; + cfg->highpassfreq = gfp->highpassfreq; diff --git a/audio/lame/patches/patch-libmp3lame_util.c b/audio/lame/patches/patch-libmp3lame_util.c new file mode 100644 index 00000000000..099638f7a42 --- /dev/null +++ b/audio/lame/patches/patch-libmp3lame_util.c @@ -0,0 +1,23 @@ +$NetBSD: patch-libmp3lame_util.c,v 1.1 2015/02/27 19:49:16 snj Exp $ + +https://bugs.debian.org/778529 + +--- libmp3lame/util.c.orig 2012-01-10 11:55:55.000000000 -0800 ++++ libmp3lame/util.c 2015-02-27 11:25:26.000000000 -0800 +@@ -26,6 +26,7 @@ + # include <config.h> + #endif + ++#include <float.h> + #include "lame.h" + #include "machine.h" + #include "encoder.h" +@@ -544,7 +545,7 @@ fill_buffer_resample(lame_internal_flags + if (bpc > BPC) + bpc = BPC; + +- intratio = (fabs(resample_ratio - floor(.5 + resample_ratio)) < .0001); ++ intratio = (fabs(resample_ratio - floor(.5 + resample_ratio)) < FLT_EPSILON); + fcn = 1.00 / resample_ratio; + if (fcn > 1.00) + fcn = 1.00; |