[arch-commits] Commit in flac/trunk (PKGBUILD flac-divby0.patch)
Eric Bélanger
eric at archlinux.org
Fri Sep 26 18:30:21 UTC 2014
Date: Friday, September 26, 2014 @ 20:30:20
Author: eric
Revision: 223358
upgpkg: flac 1.3.0-4
Add patch to fix floating point exception (close FS#42125)
Added:
flac/trunk/flac-divby0.patch
Modified:
flac/trunk/PKGBUILD
-------------------+
PKGBUILD | 9 ++++++---
flac-divby0.patch | 47 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 53 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-09-26 17:34:06 UTC (rev 223357)
+++ PKGBUILD 2014-09-26 18:30:20 UTC (rev 223358)
@@ -4,7 +4,7 @@
pkgbase=flac
pkgname=('flac' 'flac-doc')
pkgver=1.3.0
-pkgrel=3
+pkgrel=4
arch=('i686' 'x86_64')
url="http://flac.sourceforge.net/"
license=('BSD' 'GPL')
@@ -11,13 +11,16 @@
depends=('gcc-libs' 'libogg')
makedepends=('nasm' 'doxygen')
options=('!makeflags')
-source=(http://downloads.xiph.org/releases/flac/${pkgbase}-${pkgver}.tar.xz flac-realloc.patch)
+source=(http://downloads.xiph.org/releases/flac/${pkgbase}-${pkgver}.tar.xz
+ flac-realloc.patch flac-divby0.patch)
sha1sums=('a136e5748f8fb1e6c524c75000a765fc63bb7b1b'
- '22bf08219c289d747f399e351c701d0f195d3ce0')
+ '22bf08219c289d747f399e351c701d0f195d3ce0'
+ 'ceecf0603895267eda112c1cf85e3096e3d3acde')
prepare() {
cd ${pkgbase}-${pkgver}
patch -p1 -i "${srcdir}/flac-realloc.patch"
+ patch -p1 -i "${srcdir}/flac-divby0.patch"
}
build() {
Added: flac-divby0.patch
===================================================================
--- flac-divby0.patch (rev 0)
+++ flac-divby0.patch 2014-09-26 18:30:20 UTC (rev 223358)
@@ -0,0 +1,47 @@
+From 9443151da38d25430f0683dfdcd7f6076ecabe0a Mon Sep 17 00:00:00 2001
+From: Erik de Castro Lopo <erikd at mega-nerd.com>
+Date: Tue, 8 Jul 2014 18:25:11 +1000
+Subject: [PATCH] src/flac/utils.c : Make sure get_console_width() returns value > 0.
+
+Previous version of get_console_width() may return 0 which will result in
+a division by 0 in stats_print_name():
+
+ console_width = get_console_width();
+ len = strlen_console(name)+2;
+ console_chars_left = console_width - (len % console_width);
+
+Bug-report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739613
+Patch-from: lvqcl <lvqcl.mail at gmail.com>
+---
+ src/flac/utils.c | 7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/flac/utils.c b/src/flac/utils.c
+index 557477e..52b2c43 100644
+--- a/src/flac/utils.c
++++ b/src/flac/utils.c
+@@ -176,7 +176,7 @@ static int console_chars_left;
+
+ int get_console_width(void)
+ {
+- int width = 80;
++ int width = 0;
+ #if defined _WIN32
+ width = win_get_console_width();
+ #elif defined __EMX__
+@@ -185,8 +185,11 @@ int get_console_width(void)
+ width = s[0];
+ #elif defined GWINSZ_IN_SYS_IOCTL
+ struct winsize w;
+- if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) != -1) width = w.ws_col;
++ if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) != -1)
++ width = w.ws_col;
+ #endif
++ if (width <= 0)
++ width = 80;
+ return width;
+ }
+
+--
+1.7.2.5
+
More information about the arch-commits
mailing list