From 5fd3d2b196ce242c4ffff1b6c836aa5a248378d3 Mon Sep 17 00:00:00 2001 From: Kevin Coffman Date: Mon, 23 Oct 2006 16:15:50 +0000 Subject: [PATCH] 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 --- src/lib/krb5/krb/get_in_tkt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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') { -- 2.26.2