git.samba.org
/
garming
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
050d1e7
)
ctdb: Fix an out of bound array access
author
Andreas Schneider
<asn@samba.org>
Mon, 12 Nov 2018 09:21:15 +0000
(10:21 +0100)
committer
Andrew Bartlett
<abartlet@samba.org>
Wed, 14 Nov 2018 04:07:15 +0000
(
05:07
+0100)
Found by cppcheck.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13680
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
ctdb/common/logging.c
patch
|
blob
|
history
diff --git
a/ctdb/common/logging.c
b/ctdb/common/logging.c
index aaa93216ef552c97b30c86b96de1152ffc9b62d6..7ed500aeb0b365d6630e0d70098db43a2186cd0d 100644
(file)
--- a/
ctdb/common/logging.c
+++ b/
ctdb/common/logging.c
@@
-85,7
+85,7
@@
const char *debug_level_to_string(int log_level)
{
int i;
- for (i=0; ARRAY_SIZE(log_string_map); i++) {
+ for (i=0;
i <
ARRAY_SIZE(log_string_map); i++) {
if (log_string_map[i].log_level == log_level) {
return log_string_map[i].log_string;
}