pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/security/policykit From FreeBSD:
details: https://anonhg.NetBSD.org/pkgsrc/rev/b91ebc952a4d
branches: trunk
changeset: 550531:b91ebc952a4d
user: jmcneill <jmcneill%pkgsrc.org@localhost>
date: Sun Nov 23 22:28:23 2008 +0000
description:
>From FreeBSD:
Fix a problem with PK's strndup() implementation assuming all strings
passed to it would be NUL-terminated. This is known to fix crashes with
polkit-gnome-authorization and clock-applet.
diffstat:
security/policykit/distinfo | 3 ++-
security/policykit/patches/patch-aj | 29 +++++++++++++++++++++++++++++
2 files changed, 31 insertions(+), 1 deletions(-)
diffs (47 lines):
diff -r 6f805627c3ac -r b91ebc952a4d security/policykit/distinfo
--- a/security/policykit/distinfo Sun Nov 23 22:08:45 2008 +0000
+++ b/security/policykit/distinfo Sun Nov 23 22:28:23 2008 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2008/11/23 21:21:43 hasso Exp $
+$NetBSD: distinfo,v 1.3 2008/11/23 22:28:23 jmcneill Exp $
SHA1 (PolicyKit-0.9.tar.gz) = ac99c580eff72f6d5df261c155fb047306439f85
RMD160 (PolicyKit-0.9.tar.gz) = 197262d1c48e55558dd4bd57d7bbd8734666129c
@@ -12,3 +12,4 @@
SHA1 (patch-ag) = bfa1a32a26d80a3cbc90144ae137d4ad06832e61
SHA1 (patch-ah) = a1ae419a77bb3c8be02706bb67476af9443af92a
SHA1 (patch-ai) = 9ec3744b394b0f6181a8a3367f0ce93e32b7fc4f
+SHA1 (patch-aj) = 596b9eb54173e25176ba0f363e4b2c4c137dd89f
diff -r 6f805627c3ac -r b91ebc952a4d security/policykit/patches/patch-aj
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/policykit/patches/patch-aj Sun Nov 23 22:28:23 2008 +0000
@@ -0,0 +1,29 @@
+$NetBSD: patch-aj,v 1.1 2008/11/23 22:28:23 jmcneill Exp $
+
+--- 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;
+ }
Home |
Main Index |
Thread Index |
Old Index