BUG/MINOR: jwt: fix variable initialisation
Set the alg variable from sample_conv_jwt_verify_check() to
JWT_ALG_DEFAULT.
This was reported by coverity in #2630, but since you need to use the
first argument to use the 2nd, this has no real impact.
Mut be backported with 883f1bd (as far as 2.6).
(cherry picked from commit 0a1b251c1a2ac55e135db0f5ac3d241e218308b4)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit d3ffe441cc93c436081e9a5eff2b66779d6d2547)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 816d3bd9a7bfe4488f7767601eac5fc34184e57a)
Signed-off-by: Willy Tarreau <w@1wt.eu>
diff --git a/src/sample.c b/src/sample.c
index 15312de..d001d77 100644
--- a/src/sample.c
+++ b/src/sample.c
@@ -3861,7 +3861,8 @@
static int sample_conv_jwt_verify_check(struct arg *args, struct sample_conv *conv,
const char *file, int line, char **err)
{
- enum jwt_alg alg;
+ enum jwt_alg alg = JWT_ALG_DEFAULT;
+
vars_check_arg(&args[0], NULL);
vars_check_arg(&args[1], NULL);