Terminate the loop in find_authdata_1 if we get an error in one of the
authorGreg Hudson <ghudson@mit.edu>
Mon, 30 Nov 2009 01:19:14 +0000 (01:19 +0000)
committerGreg Hudson <ghudson@mit.edu>
Mon, 30 Nov 2009 01:19:14 +0000 (01:19 +0000)
iterations.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23382 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/copy_auth.c

index d4c270078a356b7630c4dfe9bfd36d499a7a8710..88bc3faf9231106bf8cb6373d1583640802842dc 100644 (file)
@@ -229,7 +229,7 @@ find_authdata_1(krb5_context context, krb5_authdata *const *in_authdat,
     int i = 0;
     krb5_error_code retval = 0;
 
-    for (i = 0; in_authdat[i]; i++) {
+    for (i = 0; in_authdat[i] && retval == 0; i++) {
         krb5_authdata *ad = in_authdat[i];
         krb5_authdata **decoded_container;