summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorKevin Coffman <kwc@citi.umich.edu>2006-10-23 16:15:50 +0000
committerKevin Coffman <kwc@citi.umich.edu>2006-10-23 16:15:50 +0000
commit5fd3d2b196ce242c4ffff1b6c836aa5a248378d3 (patch)
tree4a8b03c14c9b9e86f431e696fb7eb65596613d1a /src/lib
parent76ffa3584871b4bd81215daaa6ccca72ab177bf6 (diff)
downloadkrb5-5fd3d2b196ce242c4ffff1b6c836aa5a248378d3.tar.gz
krb5-5fd3d2b196ce242c4ffff1b6c836aa5a248378d3.tar.xz
krb5-5fd3d2b196ce242c4ffff1b6c836aa5a248378d3.zip
fix invalid access found by valgrind
Valgrind found that we were reading past the end of the preferred padata string. p is manually updated within the loop and there is no need for the increment. It was causing the null terminator to be skipped over, rather than properly terminating the loop. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18735 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb5/krb/get_in_tkt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/krb5/krb/get_in_tkt.c b/src/lib/krb5/krb/get_in_tkt.c
index 53042fb2c..8d75c60c3 100644
--- a/src/lib/krb5/krb/get_in_tkt.c
+++ b/src/lib/krb5/krb/get_in_tkt.c
@@ -795,7 +795,7 @@ sort_krb5_padata_sequence(krb5_context context, krb5_data *realm,
#endif
base = 0;
- for (p = preauth_types; *p != '\0'; p++) {
+ for (p = preauth_types; *p != '\0';) {
/* skip whitespace to find an entry */
p += strspn(p, ", ");
if (*p != '\0') {