From 95e57a0b40b64a65773e46c905443e6579e217c2 Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Mon, 13 Jan 2025 20:11:02 +0100 Subject: [PATCH] Fix code scanning alert no. 14: Redundant null check due to previous dereference Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- src/lib/protocols/btlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/protocols/btlib.c b/src/lib/protocols/btlib.c index ae3c1e3656c..14ec331b2c5 100644 --- a/src/lib/protocols/btlib.c +++ b/src/lib/protocols/btlib.c @@ -459,7 +459,7 @@ const u_int8_t *bt_decode(const u_int8_t *b, size_t *l, int *ret, bt_parse_data_ if(*ret < 0) goto bad_data; cbd->t = 0; *ls = 0; - } while (*b != 'e' && l != 0); + } while (*b != 'e' && *l != 0); b++; (*l)--; cbd->level--;