* [Cluster-devel] [PATCH 2/2] fence_kdump: fix potential null dereference
@ 2011-09-19 17:11 Ryan O'Hara
2011-09-19 17:16 ` Fabio M. Di Nitto
0 siblings, 1 reply; 2+ messages in thread
From: Ryan O'Hara @ 2011-09-19 17:11 UTC (permalink / raw)
To: cluster-devel.redhat.com
If strchr returns NULL while parsing options from stdin, continue
without handling the option. This should prevent possible null
dereference.
rhbz#734429
Signed-off-by: Ryan O'Hara <rohara@redhat.com>
---
fence/agents/kdump/fence_kdump.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fence/agents/kdump/fence_kdump.c b/fence/agents/kdump/fence_kdump.c
index 2844a3e..e224db3 100644
--- a/fence/agents/kdump/fence_kdump.c
+++ b/fence/agents/kdump/fence_kdump.c
@@ -427,6 +427,8 @@ get_options_stdin (fence_kdump_opts_t *opts)
if ((arg = strchr (opt, '=')) != 0) {
*arg = 0;
arg += 1;
+ } else {
+ continue;
}
if (!strcasecmp (opt, "nodename")) {
--
1.7.3.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Cluster-devel] [PATCH 2/2] fence_kdump: fix potential null dereference
2011-09-19 17:11 [Cluster-devel] [PATCH 2/2] fence_kdump: fix potential null dereference Ryan O'Hara
@ 2011-09-19 17:16 ` Fabio M. Di Nitto
0 siblings, 0 replies; 2+ messages in thread
From: Fabio M. Di Nitto @ 2011-09-19 17:16 UTC (permalink / raw)
To: cluster-devel.redhat.com
ACK
Fabio
On 9/19/2011 7:11 PM, Ryan O'Hara wrote:
> If strchr returns NULL while parsing options from stdin, continue
> without handling the option. This should prevent possible null
> dereference.
>
> rhbz#734429
>
> Signed-off-by: Ryan O'Hara <rohara@redhat.com>
> ---
> fence/agents/kdump/fence_kdump.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/fence/agents/kdump/fence_kdump.c b/fence/agents/kdump/fence_kdump.c
> index 2844a3e..e224db3 100644
> --- a/fence/agents/kdump/fence_kdump.c
> +++ b/fence/agents/kdump/fence_kdump.c
> @@ -427,6 +427,8 @@ get_options_stdin (fence_kdump_opts_t *opts)
> if ((arg = strchr (opt, '=')) != 0) {
> *arg = 0;
> arg += 1;
> + } else {
> + continue;
> }
>
> if (!strcasecmp (opt, "nodename")) {
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-09-19 17:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-19 17:11 [Cluster-devel] [PATCH 2/2] fence_kdump: fix potential null dereference Ryan O'Hara
2011-09-19 17:16 ` Fabio M. Di Nitto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).