[krb5-auth-dialog] krb5_principal_compare crashes on NULL arguments
- From: Guido Günther <guidog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [krb5-auth-dialog] krb5_principal_compare crashes on NULL arguments
- Date: Tue, 1 Oct 2013 21:51:08 +0000 (UTC)
commit 9acb30e12410b5fa6f08d5f38a6ddecbd06d3139
Author: Petter Reinholdtsen <pere hungry com>
Date: Thu Jul 4 09:32:18 2013 +0200
krb5_principal_compare crashes on NULL arguments
Debian Bug #714825
src/ka-kerberos.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/ka-kerberos.c b/src/ka-kerberos.c
index db5cddd..0867234 100644
--- a/src/ka-kerberos.c
+++ b/src/ka-kerberos.c
@@ -221,8 +221,10 @@ credentials_expiring_real (KaApplet *applet)
}
/* copy principal from cache if any */
- if (krb5_principal_compare (kcontext, my_creds.client, kprincipal)) {
- krb5_free_principal (kcontext, kprincipal);
+ if (kprincipal == NULL ||
+ krb5_principal_compare (kcontext, my_creds.client, kprincipal)) {
+ if (kprincipal)
+ krb5_free_principal (kcontext, kprincipal);
krb5_copy_principal (kcontext, my_creds.client, &kprincipal);
}
creds_expiry = my_creds.times.endtime;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]