Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong check for ctx->username? #11

Closed
lilydjwg opened this issue Feb 22, 2016 · 1 comment
Closed

Wrong check for ctx->username? #11

lilydjwg opened this issue Feb 22, 2016 · 1 comment

Comments

@lilydjwg
Copy link

I see this:

    /* empty the username in the context to not loose our context */
    if (ctx->username == NULL)
    {
      free(ctx->username);
      ctx->username = NULL;
    }

Shouldn't it test for != NULL?

arthurdejong added a commit that referenced this issue Feb 22, 2016
This could result in a free(NULL) call. This code path can only be
triggered if pam_ldap changes the logged-in username (introduced in
6a74d8d).

Thanks 依云, see
#11
@arthurdejong
Copy link
Owner

Thanks for pointing this out. Fixed in 4be9c59.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants