diff options
author | Ken Raeburn <raeburn@mit.edu> | 2009-02-02 18:10:30 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2009-02-02 18:10:30 +0000 |
commit | 88389c3e9793b5975ed4cbde026f55fd009d2056 (patch) | |
tree | 4b92d84829ccf0a45c3cf2068dd3df64b0112498 /src | |
parent | df577dd81ea3ccb5752cab0f01386c803593755d (diff) | |
download | krb5-88389c3e9793b5975ed4cbde026f55fd009d2056.tar.gz krb5-88389c3e9793b5975ed4cbde026f55fd009d2056.tar.xz krb5-88389c3e9793b5975ed4cbde026f55fd009d2056.zip |
reapply memchr patch
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21862 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r-- | src/kdc/do_tgs_req.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/kdc/do_tgs_req.c b/src/kdc/do_tgs_req.c index a6ce704bd7..d63ef65fef 100644 --- a/src/kdc/do_tgs_req.c +++ b/src/kdc/do_tgs_req.c @@ -1068,7 +1068,6 @@ static krb5_int32 prep_reprocess_req(krb5_kdc_req *request, krb5_principal *krbtgt_princ) { krb5_error_code retval = KRB5KRB_AP_ERR_BADMATCH; - size_t len = 0; char **realms, **cpp, *temp_buf=NULL; krb5_data *comp1 = NULL, *comp2 = NULL; char *comp1_str = NULL; @@ -1110,11 +1109,8 @@ prep_reprocess_req(krb5_kdc_req *request, krb5_principal *krbtgt_princ) (krb5_match_config_pattern(kdc_active_realm->realm_no_host_referral, "*") == FALSE && krb5_match_config_pattern(kdc_active_realm->realm_no_host_referral, comp1_str) == FALSE))) { - for (len=0; len < comp2->length; len++) { - if (comp2->data[len] == '.') break; - } - if (len == comp2->length) - goto cleanup; + if (memchr(comp2->data, '.', comp2->length) == NULL) + goto cleanup; temp_buf = calloc(1, comp2->length+1); if (!temp_buf){ retval = ENOMEM; |