File krb5-appl-telnet-CVE-2011-4862.patch of Package krb5-appl.import5593

Index: krb5-appl/telnet/libtelnet/encrypt.c
===================================================================
--- krb5-appl/telnet/libtelnet/encrypt.c
+++ krb5-appl/telnet/libtelnet/encrypt.c
@@ -755,6 +755,9 @@ static void encrypt_keyid(kp, keyid, len
 	int dir = kp->dir;
 	register int ret = 0;
 
+	if (len > MAXKEYLEN)
+		len = MAXKEYLEN;
+
 	if (!(ep = (*kp->getcrypt)(*kp->modep))) {
 		if (len == 0)
 			return;
openSUSE Build Service is sponsored by