From: Nick Porter Date: Thu, 22 Jun 2023 13:15:35 +0000 (+0100) Subject: Correct locating of fr_tls_conf_t when parsing cache mode X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afcba302eed6272b2ff2ff5baecb54960c6dba55;p=thirdparty%2Ffreeradius-server.git Correct locating of fr_tls_conf_t when parsing cache mode `parent` is the fr_tls_cache_conf_t being populated, which is a member of the fr_tls_conf_t. --- diff --git a/src/lib/tls/conf.c b/src/lib/tls/conf.c index d16da1baa63..16637fbde37 100644 --- a/src/lib/tls/conf.c +++ b/src/lib/tls/conf.c @@ -242,7 +242,7 @@ CONF_PARSER fr_tls_client_config[] = { static int tls_conf_parse_cache_mode(TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, CONF_PARSER const *rule) { - fr_tls_conf_t *conf = talloc_get_type_abort(parent, fr_tls_conf_t); + fr_tls_conf_t *conf = talloc_get_type_abort((uint8_t *)parent - offsetof(fr_tls_conf_t, cache), fr_tls_conf_t); int cache_mode; if (cf_table_parse_int(ctx, &cache_mode, parent, ci, rule) < 0) return -1;