Skip to content

Commit bd6b6d1

Browse files
Fix allocation of cred_store to have two extra slots
Signed-off-by: Robbie Harwood <[email protected]> Reviewed-by: Simo Sorce <[email protected]> Merges: 46
1 parent b6d6348 commit bd6b6d1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

proxy/src/gp_creds.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,9 @@ static int gp_get_cred_environment(struct gp_call_ctx *gpcall,
411411
return 0;
412412
}
413413

414-
/* allocate 1 more than in source, just in case we need to add
415-
* an internal client_keytab element */
416-
cs->elements = calloc(svc->krb5.store.count + 1,
414+
/* allocate 2 more than in source, just in case we need to add
415+
* an internal client_keytab element and ccache */
416+
cs->elements = calloc(svc->krb5.store.count + 2,
417417
sizeof(gss_key_value_element_desc));
418418
if (!cs->elements) {
419419
ret = ENOMEM;

0 commit comments

Comments
 (0)