From 4cb23c61c7782fbabc44d9c91af793fc85903f58 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Tue, 20 Jun 2023 01:37:48 +0000 Subject: [PATCH] krb5/fcache: Sprinkle const; note strict aliasing violation. --- lib/krb5/fcache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/krb5/fcache.c b/lib/krb5/fcache.c index 1c32389fa..c7a2c0382 100644 --- a/lib/krb5/fcache.c +++ b/lib/krb5/fcache.c @@ -1306,6 +1306,7 @@ is_default_collection(krb5_context context, const char *name, { krb5_error_code ret; const char *def_loc[2] = { KRB5_DEFAULT_CCNAME_FILE, NULL }; + const char *const def_loc[2] = { KRB5_DEFAULT_CCNAME_FILE, NULL }; const char *sep; size_t namelen; size_t i; @@ -1385,7 +1386,8 @@ fcc_get_cache_first(krb5_context context, krb5_cc_cursor *cursor) * locations. */ if ((ret = is_default_collection(context, def_ccname, - (const char **)def_locs, + /* XXX strict aliasing violation */ + (const char * const *)def_locs, &is_def_coll))) goto out;