summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2008-07-24 13:52:10 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2008-07-24 13:52:10 +0000
commitc5413f6b759c0e2e07d09c23dd260930141b2321 (patch)
treed69780e219a69fecb04f492ccc00346f63cde317 /sysutils
parent- Fix a bug in mod_python when using apr 1.3.x which (diff)
This patch should not have been removed. It is very much required.
Notes
Notes: svn path=/head/; revision=217421
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/policykit/Makefile1
-rw-r--r--sysutils/policykit/files/patch-src_kit_kit-string.c27
2 files changed, 28 insertions, 0 deletions
diff --git a/sysutils/policykit/Makefile b/sysutils/policykit/Makefile
index 15a4eca41ac0..240ac00f5581 100644
--- a/sysutils/policykit/Makefile
+++ b/sysutils/policykit/Makefile
@@ -8,6 +8,7 @@
PORTNAME= policykit
PORTVERSION= 0.9
+PORTREVISION= 1
CATEGORIES= sysutils gnome
MASTER_SITES= http://hal.freedesktop.org/releases/
DISTNAME= PolicyKit-${PORTVERSION}
diff --git a/sysutils/policykit/files/patch-src_kit_kit-string.c b/sysutils/policykit/files/patch-src_kit_kit-string.c
new file mode 100644
index 000000000000..eff7cb997c58
--- /dev/null
+++ b/sysutils/policykit/files/patch-src_kit_kit-string.c
@@ -0,0 +1,27 @@
+--- src/kit/kit-string.c.orig 2008-05-30 17:24:44.000000000 -0400
++++ src/kit/kit-string.c 2008-07-24 01:21:34.000000000 -0400
+@@ -123,13 +123,18 @@ static char
+ if ( !s )
+ return NULL;
+
+- if ( strlen(s) > n )
+- nAvail = n + 1;
+- else
+- nAvail = strlen(s) + 1;
+- p = malloc ( nAvail );
++ if (memchr(s, '\0', n) != NULL) {
++ nAvail = strlen(s);
++ if ( nAvail > n )
++ nAvail = n;
++ } else {
++ nAvail = n;
++ }
++ p = malloc ( nAvail + 1 );
++ if (p == NULL)
++ return NULL;
+ memcpy ( p, s, nAvail );
+- p[nAvail - 1] = '\0';
++ p[nAvail] = '\0';
+
+ return p;
+ }