Fix CVE-2011-4862 Buffer overflow in libtelnet/encrypt.c in telnetd
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-4862 http://security.freebsd.org/advisories/FreeBSD-SA-11:08.telnetd.asc http://security.freebsd.org/patches/SA-11:08/telnetd.patch
This commit is contained in:
@@ -736,6 +736,9 @@ encrypt_keyid(struct key_info *kp, unsigned char *keyid, int len)
|
||||
int dir = kp->dir;
|
||||
int ret = 0;
|
||||
|
||||
if (len > MAXKEYLEN)
|
||||
len = MAXKEYLEN;
|
||||
|
||||
if (!(ep = (*kp->getcrypt)(*kp->modep))) {
|
||||
if (len == 0)
|
||||
return;
|
||||
|
Reference in New Issue
Block a user