aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2011-10-08 00:15:47 +0800
committerume <ume@FreeBSD.org>2011-10-08 00:15:47 +0800
commit403ec98318bc312eb368210b7ba9ce886082e1d5 (patch)
tree0724857e94ea73839d3e4d1d241d42d3defb9646 /security
parent21184858731fc92da4f2c37089ea8c0b6c0a2b80 (diff)
downloadfreebsd-ports-gnome-403ec98318bc312eb368210b7ba9ce886082e1d5.tar.gz
freebsd-ports-gnome-403ec98318bc312eb368210b7ba9ce886082e1d5.tar.zst
freebsd-ports-gnome-403ec98318bc312eb368210b7ba9ce886082e1d5.zip
Fix GSSAPI client crash, NULL ptr dereference.
Submitted by: Phil Pennock <cyrus-sasl-phil__at__spodhuis.org> Obtained from: http://lists.andrew.cmu.edu/pipermail/cyrus-sasl/2011-October/002358.html
Diffstat (limited to 'security')
-rw-r--r--security/cyrus-sasl2/Makefile2
-rw-r--r--security/cyrus-sasl2/files/patch-plugins::gssapi.c22
2 files changed, 23 insertions, 1 deletions
diff --git a/security/cyrus-sasl2/Makefile b/security/cyrus-sasl2/Makefile
index 25d4c2a28b62..e9d509ff97b6 100644
--- a/security/cyrus-sasl2/Makefile
+++ b/security/cyrus-sasl2/Makefile
@@ -7,7 +7,7 @@
PORTNAME= cyrus-sasl
PORTVERSION= 2.1.25
-#PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= security ipv6
MASTER_SITES= ftp://ftp.cyrusimap.org/cyrus-sasl/
diff --git a/security/cyrus-sasl2/files/patch-plugins::gssapi.c b/security/cyrus-sasl2/files/patch-plugins::gssapi.c
new file mode 100644
index 000000000000..b718945a0c24
--- /dev/null
+++ b/security/cyrus-sasl2/files/patch-plugins::gssapi.c
@@ -0,0 +1,22 @@
+Index: plugins/gssapi.c
+diff -u -p plugins/gssapi.c.orig plugins/gssapi.c
+--- plugins/gssapi.c.orig 2011-05-12 04:25:55.000000000 +0900
++++ plugins/gssapi.c 2011-10-08 00:31:28.401398246 +0900
+@@ -370,7 +370,7 @@ sasl_gss_encode(void *context, const str
+ }
+
+ if (output_token->value && output) {
+- unsigned char * p = (unsigned char *) text->encode_buf;
++ unsigned char * p;
+
+ ret = _plug_buf_alloc(text->utils,
+ &(text->encode_buf),
+@@ -383,6 +383,8 @@ sasl_gss_encode(void *context, const str
+ GSS_UNLOCK_MUTEX(text->utils);
+ return ret;
+ }
++
++ p = (unsigned char *) text->encode_buf;
+
+ p[0] = (output_token->length>>24) & 0xFF;
+ p[1] = (output_token->length>>16) & 0xFF;