projects
/
haproxy-2.1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9727cf4
)
CLEANUP: pattern: Ignore unknown samples in pat_match_ip().
author
Andreas Seltenreich
<andreas.seltenreich@credativ.de>
Thu, 3 Mar 2016 19:08:35 +0000
(20:08 +0100)
committer
Willy Tarreau
<w@1wt.eu>
Tue, 8 Mar 2016 11:55:06 +0000
(12:55 +0100)
Ignore samples that are neither SMP_T_IPV4 nor SMP_T_IPV6 instead of
matching with an uninitialized value in this case.
This situation should not occur in the current codebase but triggers
warnings in static code analysis tools.
Found in haproxy 1.5.
src/pattern.c
patch
|
blob
|
history
diff --git
a/src/pattern.c
b/src/pattern.c
index
b4cb8e9
..
9d07b89
100644
(file)
--- a/
src/pattern.c
+++ b/
src/pattern.c
@@
-1021,6
+1021,9
@@
struct pattern *pat_match_ip(struct sample *smp, struct pattern_expr *expr, int
}
else
continue;
+ } else {
+ /* impossible */
+ continue;
}
/* Check if the input sample match the current pattern. */