svn rev #22974: trunk/src/lib/krb5/krb/

lhoward@MIT.EDU lhoward at MIT.EDU
Thu Oct 22 17:00:19 EDT 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=22974
Commit By: lhoward
Log Message:
When iterating through the keytab in krb5_rd_req(), do not
return success if we did not find any matching keytab entries,
otherwise we will crash upon accessing ticket->enc_part2.



Changed Files:
U   trunk/src/lib/krb5/krb/rd_req_dec.c
Modified: trunk/src/lib/krb5/krb/rd_req_dec.c
===================================================================
--- trunk/src/lib/krb5/krb/rd_req_dec.c	2009-10-22 20:58:37 UTC (rev 22973)
+++ trunk/src/lib/krb5/krb/rd_req_dec.c	2009-10-22 21:00:19 UTC (rev 22974)
@@ -119,9 +119,11 @@
 	krb5_error_code code;
 	krb5_kt_cursor cursor;
 
-	retval = krb5_kt_start_seq_get(context, keytab, &cursor);
-	if (retval != 0)
+	code = krb5_kt_start_seq_get(context, keytab, &cursor);
+	if (code != 0) {
+	    retval = code;
 	    goto map_error;
+	}
 
 	while ((code = krb5_kt_next_entry(context, keytab,
 					  &ktent, &cursor)) == 0) {




More information about the cvs-krb5 mailing list