From: Ken Raeburn Date: Thu, 15 Jun 2006 22:01:57 +0000 (+0000) Subject: (kadmin_startup): Properly skip "\@" and "\/" sequences when X-Git-Tag: krb5-1.5-beta1~21 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ac7858aee8d23354d706bb8d32b278ea6acd6277;p=krb5.git (kadmin_startup): Properly skip "\@" and "\/" sequences when processing principal name, rather than going into an infinite loop. Suggested by Mark Phalan at Sun. ticket: 3697 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18148 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kadmin/cli/kadmin.c b/src/kadmin/cli/kadmin.c index 0b1342015..e7594170d 100644 --- a/src/kadmin/cli/kadmin.c +++ b/src/kadmin/cli/kadmin.c @@ -404,7 +404,7 @@ char *kadmin_startup(argc, argv) if (realm - canon && *(realm - 1) != '\\') break; else - realm = strchr(realm, '@'); + realm = strchr(realm+1, '@'); } if (realm) *realm++ = '\0'; @@ -413,7 +413,7 @@ char *kadmin_startup(argc, argv) if (cp - canon && *(cp - 1) != '\\') break; else - cp = strchr(cp, '/'); + cp = strchr(cp+1, '/'); } if (cp != NULL) *cp = '\0';