Skip to content

A couple of bugfixes#40

Merged
asalkeld merged 2 commits intoClusterLabs:masterfrom
jsgf:master
Aug 23, 2012
Merged

A couple of bugfixes#40
asalkeld merged 2 commits intoClusterLabs:masterfrom
jsgf:master

Conversation

@jsgf
Copy link
Copy Markdown
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
Copy Markdown

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

@asalkeld
Copy link
Copy Markdown
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