summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexandra Ellwood <lxs@mit.edu>2008-10-24 20:54:12 +0000
committerAlexandra Ellwood <lxs@mit.edu>2008-10-24 20:54:12 +0000
commit105843a4d3123d2ce0a668e4512efc974720f2d3 (patch)
tree713e51703a375c2da880a1dceb7667e7b4f35038 /src
parentfcf15c482b582c4f2e5dd7c6222c4e3509bbb7d6 (diff)
downloadkrb5-105843a4d3123d2ce0a668e4512efc974720f2d3.tar.gz
krb5-105843a4d3123d2ce0a668e4512efc974720f2d3.tar.xz
krb5-105843a4d3123d2ce0a668e4512efc974720f2d3.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/lib/krb5/krb/bld_pr_ext.c2
1 files changed, 1 insertions, 1 deletions
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);