summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-crypt/heimdal/files/CVE-2011-4862.patch')
-rw-r--r--app-crypt/heimdal/files/CVE-2011-4862.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/app-crypt/heimdal/files/CVE-2011-4862.patch b/app-crypt/heimdal/files/CVE-2011-4862.patch
new file mode 100644
index 000000000000..1c4672fcaf98
--- /dev/null
+++ b/app-crypt/heimdal/files/CVE-2011-4862.patch
@@ -0,0 +1,16 @@
+Stolen shamelessly from FreeBSD
+
+Index: crypto/heimdal/appl/telnet/libtelnet/encrypt.c
+===================================================================
+--- appl/telnet/libtelnet/encrypt.c (revision 228798)
++++ appl/telnet/libtelnet/encrypt.c (working copy)
+@@ -736,6 +736,9 @@
+ int dir = kp->dir;
+ int ret = 0;
+
++ if (len > MAXKEYLEN)
++ len = MAXKEYLEN;
++
+ if (!(ep = (*kp->getcrypt)(*kp->modep))) {
+ if (len == 0)
+ return;