Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 181241 Details for
Bug 267441
Possible NULL pointer deferences in cman
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch to fix possible NULL pointer dereferences
null_derefs.diff (text/plain), 2.45 KB, created by
Ryan McCabe
on 2007-08-30 15:30:17 UTC
(
hide
)
Description:
patch to fix possible NULL pointer dereferences
Filename:
MIME Type:
Creator:
Ryan McCabe
Created:
2007-08-30 15:30:17 UTC
Size:
2.45 KB
patch
obsolete
>Index: cman/daemon/commands.c >=================================================================== >RCS file: /cvs/cluster/cluster/cman/daemon/commands.c,v >retrieving revision 1.55.2.8 >diff -u -r1.55.2.8 commands.c >--- cman/daemon/commands.c 26 Jun 2007 12:29:17 -0000 1.55.2.8 >+++ cman/daemon/commands.c 28 Aug 2007 17:04:22 -0000 >@@ -1805,7 +1805,8 @@ > case CLUSTER_MSG_PORTSTATUS: > if (nodeid != us->node_id) { > P_MEMB("got PORTRESULT from %d, low bytes = %x %x\n", data[1], data[2]); >- memcpy(node->port_bits, data+1, PORT_BITS_SIZE); >+ if (node) >+ memcpy(node->port_bits, data+1, PORT_BITS_SIZE); > } > break; > >Index: fence/fenced/member_cman.c >=================================================================== >RCS file: /cvs/cluster/cluster/fence/fenced/member_cman.c,v >retrieving revision 1.15.2.1 >diff -u -r1.15.2.1 member_cman.c >--- fence/fenced/member_cman.c 14 Dec 2006 19:55:49 -0000 1.15.2.1 >+++ fence/fenced/member_cman.c 28 Aug 2007 17:04:22 -0000 >@@ -199,7 +199,7 @@ > } > > /* If this call fails (though it shouldn't) then regard the node as unfenced */ >- if (cman_get_fenceinfo(ch, cn->cn_nodeid, &fence_time, &fenced, agent)) { >+ if (cn && cman_get_fenceinfo(ch, cn->cn_nodeid, &fence_time, &fenced, agent)) { > log_debug("cman_get_fenceinfo failed: %s", strerror(errno)); > fenced = 0; > } >Index: fence/fenced/recover.c >=================================================================== >RCS file: /cvs/cluster/cluster/fence/fenced/recover.c,v >retrieving revision 1.25.2.2 >diff -u -r1.25.2.2 recover.c >--- fence/fenced/recover.c 29 Jan 2007 20:30:25 -0000 1.25.2.2 >+++ fence/fenced/recover.c 28 Aug 2007 17:04:22 -0000 >@@ -218,9 +218,11 @@ > static inline void close_override(int *fd, char *path) > { > unlink(path); >- if (fd && *fd >= 0) >- close(*fd); >- *fd = -1; >+ if (fd) { >+ if (*fd >= 0) >+ close(*fd); >+ *fd = -1; >+ } > } > > static int open_override(char *path) >Index: group/daemon/joinleave.c >=================================================================== >RCS file: /cvs/cluster/cluster/group/daemon/joinleave.c,v >retrieving revision 1.19 >diff -u -r1.19 joinleave.c >--- group/daemon/joinleave.c 13 Oct 2006 20:07:45 -0000 1.19 >+++ group/daemon/joinleave.c 28 Aug 2007 17:04:22 -0000 >@@ -61,6 +61,8 @@ > app_t *a; > > a = malloc(sizeof(app_t)); >+ if (!a) >+ return NULL; > memset(a, 0, sizeof(app_t)); > > a->need_first_event = 1; >@@ -90,6 +92,10 @@ > goto out; > > a = create_app(g); >+ if (!a) { >+ rv = -ENOMEM; >+ goto out; >+ } > > a->client = ci; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 267441
: 181241