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

ghudson@MIT.EDU ghudson at MIT.EDU
Mon Feb 9 13:52:44 EST 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=21924
Commit By: ghudson
Log Message:
ticket: 6379
subject: Fix possible free of uninitialized value in walk_rtree
tags: pullup
target_version: 1.7

In rtree_hier_realms, if the first rtree_hier_tweens call failed, the
cleanup handler would free stweens which had not been initialized.
Initialize ctweens and stweens to NULL in the variable declarations to
make the cleanup handler safe.



Changed Files:
U   trunk/src/lib/krb5/krb/walk_rtree.c
Modified: trunk/src/lib/krb5/krb/walk_rtree.c
===================================================================
--- trunk/src/lib/krb5/krb/walk_rtree.c	2009-02-09 18:35:19 UTC (rev 21923)
+++ trunk/src/lib/krb5/krb/walk_rtree.c	2009-02-09 18:52:40 UTC (rev 21924)
@@ -365,7 +365,7 @@
 {
     krb5_error_code retval;
     struct hstate c, s;
-    krb5_data *ctweens, *stweens, *twp, *r, *rp;
+    krb5_data *ctweens = NULL, *stweens = NULL, *twp, *r, *rp;
     size_t nctween, nstween;
 
     *realms = NULL;




More information about the cvs-krb5 mailing list