fence_kdump: fix potential null dereference
PATCH 2/2 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 <[email protected]>
--- fence/agents/kdump/fence_kdump.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
fence/agents/kdump/fence_kdump.c +2 -0
@@ -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" )) {
Signature · 1 line
1.7.3.4
PATCH 2/2 fence_kdump: fix potential null dereference
ACK
Fabio
Quoted 24 lines · Ryan O'Hara
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 <[email protected]>--- fence/agents/kdump/fence_kdump.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)fence/agents/kdump/fence_kdump.c +2
-0@@ -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" )) {