summaryrefslogtreecommitdiff
path: root/math/qhull
diff options
context:
space:
mode:
authordrochner <drochner@pkgsrc.org>2011-11-30 10:55:49 +0000
committerdrochner <drochner@pkgsrc.org>2011-11-30 10:55:49 +0000
commit2f3817f3d7090a106349ac42ba6696369f44d150 (patch)
tree96c7a41e42e03e94d2cea36b04b05c2c526c6c22 /math/qhull
parentc7300fd52621fe6d3560500a7f2cb8ee5858cba3 (diff)
downloadpkgsrc-2f3817f3d7090a106349ac42ba6696369f44d150.tar.gz
add patch from upstream to fix signedness error in hash calculation
which can lead to an overwrite or segfault bump PKGREV
Diffstat (limited to 'math/qhull')
-rw-r--r--math/qhull/Makefile3
-rw-r--r--math/qhull/distinfo3
-rw-r--r--math/qhull/patches/patch-aa28
3 files changed, 32 insertions, 2 deletions
diff --git a/math/qhull/Makefile b/math/qhull/Makefile
index e29c05a59ae..d1f13ff4e9c 100644
--- a/math/qhull/Makefile
+++ b/math/qhull/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.2 2008/06/20 01:09:25 joerg Exp $
+# $NetBSD: Makefile,v 1.3 2011/11/30 10:55:49 drochner Exp $
#
DISTNAME= qhull-2003.1
+PKGREVISION= 1
CATEGORIES= math
MASTER_SITES= http://www.qhull.org/download/
diff --git a/math/qhull/distinfo b/math/qhull/distinfo
index 6a669a8f4d6..1e3bd020d74 100644
--- a/math/qhull/distinfo
+++ b/math/qhull/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.1.1.1 2007/09/19 18:00:54 drochner Exp $
+$NetBSD: distinfo,v 1.2 2011/11/30 10:55:49 drochner Exp $
SHA1 (qhull-2003.1.tar.gz) = 2e783b5e45cecc053b1dc08c682b871dfbb59dd2
RMD160 (qhull-2003.1.tar.gz) = 6c82ad27601f9aa12498e3bc08f06c7b777a5f4d
Size (qhull-2003.1.tar.gz) = 724313 bytes
+SHA1 (patch-aa) = 5ad003e5dd81c41ed402b3b1c390a153640cce4e
diff --git a/math/qhull/patches/patch-aa b/math/qhull/patches/patch-aa
new file mode 100644
index 00000000000..18d8da02687
--- /dev/null
+++ b/math/qhull/patches/patch-aa
@@ -0,0 +1,28 @@
+$NetBSD: patch-aa,v 1.1 2011/11/30 10:55:50 drochner Exp $
+
+poly.c-qh_gethash.patch from upstream
+
+--- src/poly.c.orig 2004-01-31 11:00:15.000000000 +0000
++++ src/poly.c
+@@ -403,6 +403,7 @@ unsigned qh_gethash (int hashsize, setT
+ void **elemp= SETelemaddr_(set, firstindex, void);
+ ptr_intT hash = 0, elem;
+ int i;
++ unsigned result;
+
+ switch (size-firstindex) {
+ case 1:
+@@ -441,9 +442,10 @@ unsigned qh_gethash (int hashsize, setT
+ }while(*elemp);
+ break;
+ }
+- hash %= (ptr_intT) hashsize;
+- /* hash= 0; for debugging purposes */
+- return hash;
++ result= (unsigned)hash;
++ result %= (unsigned)hashsize;
++ /* result= 0; for debugging purposes */
++ return result;
+ } /* gethash */
+
+ /*-<a href="qh-poly.htm#TOC"