From ac7858aee8d23354d706bb8d32b278ea6acd6277 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Thu, 15 Jun 2006 22:01:57 +0000 Subject: [PATCH] (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 --- src/kadmin/cli/kadmin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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'; -- 2.26.2