make sure there are splace for storing ETYPE_NULL att the end of the array
This commit is contained in:
@@ -1473,13 +1473,13 @@ krb5_init_creds_set_keytab(krb5_context context,
|
|||||||
goto next;
|
goto next;
|
||||||
|
|
||||||
/* add enctype to supported list */
|
/* add enctype to supported list */
|
||||||
ptr = realloc(etypes, sizeof(etypes[0]) * (netypes + 1));
|
ptr = realloc(etypes, sizeof(etypes[0]) * (netypes + 2));
|
||||||
if (ptr == NULL)
|
if (ptr == NULL)
|
||||||
goto next;
|
goto next;
|
||||||
|
|
||||||
etypes = ptr;
|
etypes = ptr;
|
||||||
etypes[netypes] = entry.keyblock.keytype;
|
etypes[netypes] = entry.keyblock.keytype;
|
||||||
etypes[netypes + 1] = 0;
|
etypes[netypes + 1] = ETYPE_NULL;
|
||||||
netypes++;
|
netypes++;
|
||||||
next:
|
next:
|
||||||
krb5_kt_free_entry(context, &entry);
|
krb5_kt_free_entry(context, &entry);
|
||||||
|
Reference in New Issue
Block a user