From 105843a4d3123d2ce0a668e4512efc974720f2d3 Mon Sep 17 00:00:00 2001 From: Alexandra Ellwood Date: Fri, 24 Oct 2008 20:54:12 +0000 Subject: [PATCH] krb5_build_principal_ext walks off beginning of array On error, krb5_build_principal_ext walks off the beginning of the array by using i-- in a conditional when it should be using --i (so that it actually compares the value of i that will be used below). ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20920 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/bld_pr_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/krb5/krb/bld_pr_ext.c b/src/lib/krb5/krb/bld_pr_ext.c index c7236b7b5..c1e19ba17 100644 --- a/src/lib/krb5/krb/bld_pr_ext.c +++ b/src/lib/krb5/krb/bld_pr_ext.c @@ -93,7 +93,7 @@ krb5_build_principal_ext(krb5_context context, krb5_principal * princ, return 0; free_out: - while (i-- >= 0) + while (--i >= 0) krb5_xfree(princ_data[i].data); krb5_xfree(princ_data); krb5_xfree(princ_ret); -- 2.26.2