lame/lame-Add-check-for-invalid-input-sample-rate.patch
Ismail Dönmez d82ffd35d1 - Add patch for SSE
- Add check for invalid input sample rate
- Avoid malformed wav causing floating point exception (integer divide by zero) 
- Fix warning on 64 bit machines. Explicitely set variables as unsigned ints.
- Enable functions with SSE instructions to maintain their own properly aligned stack
- Fix decision if sample rate ratio is an integer value or not
- run autoreconf, set GTK_CFLAGS
- Add patch to remove ansi2knr instead of using sed

- Redux the conditionals for not building gtk1 anywhere anymore

- Fix logical issue in hvogel's fix 

- Fix the conditional building of gtk1 binaries 

- Fix pkgconfig(gtk+-2.0) for >= 11.4 

- Fix bug reporting link
- BuildRequires nasm only in x86-32 (there is no assembly available
  for other archs)
- Stop BuildRequiring flac-devel, it's not used
- Remove autoreconf call and related BuildRequires and patches
- Remove old compatibility Provides
- Run spec-cleaner
- Removed all patches (unneeded)
- Replace some documentation and let the build system install its
  own

- update to 3.99.5: fixed build on 12.2

OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/lame?expand=0&rev=1
2017-02-22 09:40:08 +00:00

26 lines
734 B
Diff

From 1ea4eac3e7d57dbad42fb067a32ac1600a0397a0 Mon Sep 17 00:00:00 2001
From: Maks Naumov <maksqwe1@ukr.net>
Date: Thu, 22 Jan 2015 16:20:40 +0200
Subject: [PATCH] Add check for invalid input sample rate
Signed-off-by: Maks Naumov <maksqwe1@ukr.net>
---
libmp3lame/lame.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/libmp3lame/lame.c
+++ b/libmp3lame/lame.c
@@ -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;