projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c55e931
)
Tools: hv: Fix a bug in the key delete code
author
K. Y. Srinivasan
<
[email protected]
>
Fri, 10 Aug 2018 23:06:07 +0000
(23:06 +0000)
committer
Greg Kroah-Hartman
<
[email protected]
>
Wed, 12 Sep 2018 07:31:00 +0000
(09:31 +0200)
Fix a bug in the key delete code - the num_records range
from 0 to num_records-1.
Signed-off-by: K. Y. Srinivasan <
[email protected]
>
Reported-by: David Binderman <
[email protected]
>
Cc: <
[email protected]
>
Reviewed-by: Michael Kelley <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
tools/hv/hv_kvp_daemon.c
patch
|
blob
|
history
diff --git
a/tools/hv/hv_kvp_daemon.c
b/tools/hv/hv_kvp_daemon.c
index dbf6e8bd98ba59be0519d284fdc7bf59b19f46d3..bbb2a8ef367cacd6cbd837898608d0de785c7d73 100644
(file)
--- a/
tools/hv/hv_kvp_daemon.c
+++ b/
tools/hv/hv_kvp_daemon.c
@@
-286,7
+286,7
@@
static int kvp_key_delete(int pool, const __u8 *key, int key_size)
* Found a match; just move the remaining
* entries up.
*/
- if (i ==
num_records
) {
+ if (i ==
(num_records - 1)
) {
kvp_file_info[pool].num_records--;
kvp_update_file(pool);
return 0;