From e0d090ccbcfc9fe18f59bbee97f847f27808123c Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Tue, 12 Aug 1997 01:57:04 +0000 Subject: [PATCH] check return value from 425_conv_princ git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2943 ec53bebd-3082-4978-b11e-865c3cabbd6b --- kdc/hprop.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/kdc/hprop.c b/kdc/hprop.c index b8a92be0a..de0ac6e2b 100644 --- a/kdc/hprop.c +++ b/kdc/hprop.c @@ -110,8 +110,12 @@ conv_db(void *arg, Principal *p) memset(&ent, 0, sizeof(ent)); - krb5_425_conv_principal(pd->context, p->name, p->instance, realm, - &ent.principal); + ret = krb5_425_conv_principal(pd->context, p->name, p->instance, realm, + &ent.principal); + if(ret){ + krb5_warn(pd->context, ret, "%s.%s@%s", p->name, p->instance, realm); + return 0; + } ent.keys.len = 1; ALLOC(ent.keys.val); @@ -131,7 +135,7 @@ conv_db(void *arg, Principal *p) ALLOC(ent.max_life); *ent.max_life = krb_life_to_time(0, p->max_life); - if(*ent.max_life == (1 << 31) - 1){ + if(*ent.max_life == (1U << 31) - 1){ free(ent.max_life); ent.max_life = NULL; }