projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7c2103
)
ovs-vsctl: Check "key" is valid before dereferencing in get_external_id().
author
Justin Pettit
<jpettit@nicira.com>
Tue, 22 Feb 2011 01:19:18 +0000
(17:19 -0800)
committer
Justin Pettit
<jpettit@nicira.com>
Tue, 22 Feb 2011 18:14:53 +0000
(10:14 -0800)
Coverity #10716
utilities/ovs-vsctl.c
patch
|
blob
|
history
diff --git
a/utilities/ovs-vsctl.c
b/utilities/ovs-vsctl.c
index 31c485bab7afc9ccf6b540c9f65eff41cf828c72..9fca1c8e3bdad67817cf1c258d9ac450e8d982e9 100644
(file)
--- a/
utilities/ovs-vsctl.c
+++ b/
utilities/ovs-vsctl.c
@@
-1403,7
+1403,7
@@
get_external_id(char **keys, char **values, size_t n,
if (!key && !strncmp(keys[i], prefix, prefix_len)) {
svec_add_nocopy(&svec, xasprintf("%s=%s",
keys[i] + prefix_len, values[i]));
- } else if (key_matches(keys[i], prefix, prefix_len, key)) {
+ } else if (key
&& key
_matches(keys[i], prefix, prefix_len, key)) {
svec_add(&svec, values[i]);
break;
}