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

A couple of bugfixes #40

Merged
merged 2 commits into from
Aug 23, 2012
Merged

A couple of bugfixes #40

merged 2 commits into from
Aug 23, 2012

Conversation

jsgf
Copy link
Contributor

@jsgf jsgf commented Aug 23, 2012

Hi,

I was using the clang static analyzer on libqb (in preparation for using it on corosync), and found a couple of bugs:

  • qb_ipcs_us_connection_acceptor() doesn't check the error return from qb_ipcs_uc_recv_and_auth(), and could end up using an uninitialized user cred structure
  • more seriously, qb_rb_create_from_file() calls free on rb->shared_hdr, even though that's mmaped.

I'm not sure if either of these can happen in practice, but it seemed worth fixing.

Thanks,
J

Jeremy Fitzhardinge added 2 commits August 23, 2012 10:12
If it fails, then &ugp isn't initialized.
Since qb_rb_close() frees it by munmapping it.
@travisbot
Copy link

This pull request passes (merged 4a1e24e into 80d33e8).

@asalkeld
Copy link
Contributor

Great, thanks for the patches.

asalkeld added a commit that referenced this pull request Aug 23, 2012
Merge Jeremy's clang bugfixes.
@asalkeld asalkeld merged commit 3ce3a89 into ClusterLabs:master Aug 23, 2012
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

Successfully merging this pull request may close these issues.

3 participants