Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 339866
Collapse All | Expand All

(-)a/src/kdc/kdc_authdata.c (-4 / +4 lines)
Lines 495-501 merge_authdata (krb5_context context, Link Here
495
                krb5_boolean copy,
495
                krb5_boolean copy,
496
                krb5_boolean ignore_kdc_issued)
496
                krb5_boolean ignore_kdc_issued)
497
{
497
{
498
    size_t i, nadata = 0;
498
    size_t i, j, nadata = 0;
499
    krb5_authdata **authdata = *out_authdata;
499
    krb5_authdata **authdata = *out_authdata;
500
500
501
    if (in_authdata == NULL || in_authdata[0] == NULL)
501
    if (in_authdata == NULL || in_authdata[0] == NULL)
Lines 529-544 merge_authdata (krb5_context context, Link Here
529
        in_authdata = tmp;
529
        in_authdata = tmp;
530
    }
530
    }
531
531
532
    for (i = 0; in_authdata[i] != NULL; i++) {
532
    for (i = 0, j = 0; in_authdata[i] != NULL; i++) {
533
        if (ignore_kdc_issued &&
533
        if (ignore_kdc_issued &&
534
            is_kdc_issued_authdatum(context, in_authdata[i], 0)) {
534
            is_kdc_issued_authdatum(context, in_authdata[i], 0)) {
535
            free(in_authdata[i]->contents);
535
            free(in_authdata[i]->contents);
536
            free(in_authdata[i]);
536
            free(in_authdata[i]);
537
        } else
537
        } else
538
            authdata[nadata + i] = in_authdata[i];
538
            authdata[nadata + j++] = in_authdata[i];
539
    }
539
    }
540
540
541
    authdata[nadata + i] = NULL;
541
    authdata[nadata + j] = NULL;
542
542
543
    free(in_authdata);
543
    free(in_authdata);
544
544

Return to bug 339866