From 9fe2a01ec0fefa8b764bb6e9d7f9a09d11fed7ff Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Tue, 27 Jun 2000 21:00:02 +0000 Subject: pullup from 1.2 branch git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12442 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb4/cr_ciph.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/lib/krb4/cr_ciph.c') diff --git a/src/lib/krb4/cr_ciph.c b/src/lib/krb4/cr_ciph.c index d15a4e0fd2..d9c751271f 100644 --- a/src/lib/krb4/cr_ciph.c +++ b/src/lib/krb4/cr_ciph.c @@ -71,6 +71,17 @@ create_ciph(c, session, service, instance, realm, life, kvno, tkt, ptr = (char *) c->dat; + if(sizeof(c->dat) / 8 < (8 + + strlen(service) + 1 + + strlen(instance) + 1 + + strlen(realm) + 1 + + 1 + 1 + 1 + + tkt->length + 4 + + 7) / 8) { + c->length = 0; + return(KFAILURE); + } + memcpy(ptr, (char *) session, 8); ptr += 8; -- cgit