FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 09-19-2011, 05:11 PM
"Ryan O'Hara"
 
Default fence_kdump: fix potential null dereference

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
 
Old 09-19-2011, 05:16 PM
"Fabio M. Di Nitto"
 
Default fence_kdump: fix potential null dereference

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")) {
 

Thread Tools




All times are GMT. The time now is 10:06 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org