From 5903031630ec81aabf91811ad3ef99587df68513 Mon Sep 17 00:00:00 2001 From: Viktor Dukhovni Date: Fri, 20 Apr 2012 01:21:14 +0000 Subject: [PATCH] Don't SEGV on as-is rules without realm= Signed-off-by: Love Hornquist Astrand --- lib/krb5/principal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/krb5/principal.c b/lib/krb5/principal.c index f8cab3b02..02cb391da 100644 --- a/lib/krb5/principal.c +++ b/lib/krb5/principal.c @@ -1762,10 +1762,10 @@ _krb5_apply_name_canon_rule(krb5_context context, krb5_name_canon_rule rule, goto out; } _krb5_debug(context, 5, "As-is rule building a princ with realm=%s, " - "sname=%s, and hostname=%s", rule->realm, sname, hostname); + "sname=%s, and hostname=%s", realm, sname, hostname); ret = krb5_build_principal(context, out_princ, - strlen(rule->realm), - rule->realm, sname, hostname, + strlen(realm), + realm, sname, hostname, (char *)0); goto out; break; @@ -1806,7 +1806,7 @@ _krb5_apply_name_canon_rule(krb5_context context, krb5_name_canon_rule rule, goto out; } _krb5_debug(context, 5, "Building a princ with realm=%s, sname=%s, " - "and hostname=%s", rule->realm, sname, new_hostname); + "and hostname=%s", realm, sname, new_hostname); ret = krb5_build_principal(context, out_princ, strlen(realm), realm, sname, new_hostname, (char *)0);