projects
/
deliverable
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d81e30
)
tools: hv: Check retrun value of strchr call
author
Tomas Hozza
<thozza@redhat.com>
Wed, 22 May 2013 12:54:32 +0000
(14:54 +0200)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 3 Jun 2013 21:13:09 +0000
(14:13 -0700)
Check return value of strchr call and dereference it only if it is
not NULL.
Signed-off-by: Tomas Hozza <thozza@redhat.com>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/hv/hv_kvp_daemon.c
patch
|
blob
|
blame
|
history
diff --git
a/tools/hv/hv_kvp_daemon.c
b/tools/hv/hv_kvp_daemon.c
index 81cbb6ecce893d81392ca56343b4c825669b8e5f..5b8f28f2aafa1874642f0a54fbd7067e0f872577 100644
(file)
--- a/
tools/hv/hv_kvp_daemon.c
+++ b/
tools/hv/hv_kvp_daemon.c
@@
-765,7
+765,9
@@
static void kvp_process_ipconfig_file(char *cmd,
break;
x = strchr(p, '\n');
- *x = '\0';
+ if (x)
+ *x = '\0';
+
strcat(config_buf, p);
strcat(config_buf, ";");
}
This page took
0.025227 seconds
and
5
git commands to generate.