packages: heimdal/heimdal-kcm.patch (NEW) - facepalm, no, really, one shoul...

baggins baggins at pld-linux.org
Thu Jul 9 21:36:31 CEST 2009


Author: baggins                      Date: Thu Jul  9 19:36:31 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- facepalm, no, really, one should know that 'for' first increments and then
  checks condition - fix NULL pointer reference and skiping overy other
  element in the list

---- Files affected:
packages/heimdal:
   heimdal-kcm.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/heimdal/heimdal-kcm.patch
diff -u /dev/null packages/heimdal/heimdal-kcm.patch:1.1
--- /dev/null	Thu Jul  9 21:36:31 2009
+++ packages/heimdal/heimdal-kcm.patch	Thu Jul  9 21:36:26 2009
@@ -0,0 +1,19 @@
+diff -ur heimdal-1.2.1/kcm/cache.c heimdal-1.2.1-kcm/kcm/cache.c
+--- heimdal-1.2.1/kcm/cache.c	2008-07-28 14:04:49.000000000 +0200
++++ heimdal-1.2.1-kcm/kcm/cache.c	2009-07-09 19:36:19.041440040 +0200
+@@ -559,11 +559,12 @@
+ 
+     ret = KRB5_CC_NOTFOUND;
+ 
+-    for (c = &ccache->creds; *c != NULL; c = &(*c)->next) {
++    for (c = &ccache->creds; *c != NULL; ) {
+ 	if (krb5_compare_creds(context, whichfields, mcreds, &(*c)->cred)) {
+-	    remove_cred(context, c);
++	    remove_cred(context, c); // remove_cred does c = &(*c)->next
+ 	    ret = 0;
+-	}
++	} else
++	    c = &(*c)->next;
+     }
+ 
+     return ret;
================================================================


More information about the pld-cvs-commit mailing list