aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt
diff options
context:
space:
mode:
authorMatthias Andree <mandree@FreeBSD.org>2011-05-26 10:01:49 +0000
committerMatthias Andree <mandree@FreeBSD.org>2011-05-26 10:01:49 +0000
commit85fac38db9af8b1edd995ca10e01c8739dc13c74 (patch)
tree32f276a58854ab5e8f5d395344b9568cc13abd1f /ports-mgmt
parentf66d342f7099a996406e8fde026b7171a0dd1eeb (diff)
downloadports-85fac38db9af8b1edd995ca10e01c8739dc13c74.tar.gz
ports-85fac38db9af8b1edd995ca10e01c8739dc13c74.zip
Notes
Diffstat (limited to 'ports-mgmt')
-rw-r--r--ports-mgmt/pver/Makefile1
-rw-r--r--ports-mgmt/pver/files/patch-pver.c18
-rw-r--r--ports-mgmt/pver/files/patch-pver_c.c13
3 files changed, 32 insertions, 0 deletions
diff --git a/ports-mgmt/pver/Makefile b/ports-mgmt/pver/Makefile
index 60f6daca350e..de8b31c5ada4 100644
--- a/ports-mgmt/pver/Makefile
+++ b/ports-mgmt/pver/Makefile
@@ -7,6 +7,7 @@
PORTNAME= pver
PORTVERSION= 0.15
+PORTREVISION= 1
CATEGORIES= ports-mgmt
MASTER_SITES= http://www.csie.nctu.edu.tw/~weiyu/software/ \
${MASTER_SITE_GOOGLE_CODE}
diff --git a/ports-mgmt/pver/files/patch-pver.c b/ports-mgmt/pver/files/patch-pver.c
new file mode 100644
index 000000000000..c35e4af16b13
--- /dev/null
+++ b/ports-mgmt/pver/files/patch-pver.c
@@ -0,0 +1,18 @@
+--- ./pver.c.orig 2009-04-05 18:35:40.000000000 +0200
++++ ./pver.c 2011-05-26 12:00:10.000000000 +0200
+@@ -78,12 +78,14 @@
+ char *data_sp;
+ char *show_p;
+ char *p1, *p2;
++ int w;
+ /**
+ * show_p: dp->d_name 's c-string version
+ * data_p: data.data 's c-string version
+ */
+ asprintf(&show_p, "%.*s", dp->d_namlen, dp->d_name);
+- asprintf(&data_p, "%.*s", data.DU_LEN, (const char *)data.DU_DATA);
++ w = data.DU_LEN > INT_MAX ? INT_MAX : data.DU_LEN;
++ asprintf(&data_p, "%.*s", w, (const char *)data.DU_DATA);
+
+ /**
+ * If string data_p contains |, data_p is terminated at |
diff --git a/ports-mgmt/pver/files/patch-pver_c.c b/ports-mgmt/pver/files/patch-pver_c.c
new file mode 100644
index 000000000000..36eab0f4ec22
--- /dev/null
+++ b/ports-mgmt/pver/files/patch-pver_c.c
@@ -0,0 +1,13 @@
+--- ./pver_c.c.orig 2009-02-21 09:05:36.000000000 +0100
++++ ./pver_c.c 2011-05-26 12:00:10.000000000 +0200
+@@ -7,7 +7,9 @@
+ #include "config.h"
+
+ int show_key(DBI_UNIT *key) {
+- printf("%d %.*s\n", key->DU_LEN, key->DU_LEN, (const char *)key->DU_DATA);
++ int w;
++ w = key->DU_LEN > INT_MAX ? INT_MAX : key->DU_LEN;
++ printf("%lu %.*s\n", (unsigned long)key->DU_LEN, w, (const char *)key->DU_DATA);
+ return 0;
+ }
+