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

ghudson@MIT.EDU ghudson at MIT.EDU
Sat May 2 00:58:19 EDT 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=22303
Commit By: ghudson
Log Message:
Fix a memory leak in krb5int_rd_chpw_rep in a block of code handling
buggy MS KDC behavior.  It's not entirely clear what should happen in
the case where memory was leaked (error packet received containing
e_data) so pick a conservative option.



Changed Files:
U   trunk/src/lib/krb5/krb/chpw.c
Modified: trunk/src/lib/krb5/krb/chpw.c
===================================================================
--- trunk/src/lib/krb5/krb/chpw.c	2009-05-01 20:19:43 UTC (rev 22302)
+++ trunk/src/lib/krb5/krb/chpw.c	2009-05-02 04:58:19 UTC (rev 22303)
@@ -110,11 +110,12 @@
 	    if ((ret = krb5_rd_error(context, packet, &krberror)))
 		return(ret);
 
-	    if (krberror->e_data.data  == NULL) {
+	    if (krberror->e_data.data  == NULL)
 		ret = ERROR_TABLE_BASE_krb5 + (krb5_error_code) krberror->error;
-		krb5_free_error(context, krberror);
-		return (ret);
-	    }
+	    else
+		ret = KRB5KRB_AP_ERR_MODIFIED;
+	    krb5_free_error(context, krberror);
+	    return(ret);
 	} else {
 	    return(KRB5KRB_AP_ERR_MODIFIED);
 	}




More information about the cvs-krb5 mailing list